const b=({elementType:n="a",color:s="primary",size:u="regular",link:a="#",preventClick:d=!0,label:f,icon:c,iconPosition:t,onClick:l})=>{const e=document.createElement(n);e.innerHTML=f,e.addEventListener("click",l);const r=["btn",s,"btn-"+u];return t&&t!=="none"&&c&&(r.push(t),r.push("icon-"+c)),e.className=r.join(" "),a&&n==="a"&&(e.href=a),d&&e.addEventListener("click",p=>{p.preventDefault()}),e};export{b as c};
