import{r as t,a as e,h as i,H as n,g as a}from"./p-326e6826.js";const o=["expand_more","thumb_up","thumb_down","check","upload","info","menu","close","navigate_before","navigate_next","image_not_supported","photo_camera","upload","search","chevron_left","chevron_right"];const s=':host{display:inline-block}span{font-family:"Material Symbols Rounded";font-variation-settings:"FILL" 0, "wght" 600, "GRAD" 0, "opsz" 20}div svg{height:100%;width:100%}';var h=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var r,l;const v=new Map;const d=class{constructor(e){t(this,e);r.add(this);this.name=undefined;this.iconURL=undefined;this.iconURLSvg=undefined;this.iconAssetURL=undefined;this.svgStyle=undefined}async connectedCallback(){var t,i;const n=(i=(t=window["klevu_ui_settings"])===null||t===void 0?void 0:t.icons)===null||i===void 0?void 0:i[this.name];if(n===null||n===void 0?void 0:n.endsWith(".svg")){await h(this,r,"m",l).call(this,n)}else if(o.includes(this.name)){this.iconAssetURL=e("./assets/"+this.name+".svg")}else if(n){this.iconURL=n}if(!this.iconURL&&!this.iconURLSvg){const t="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,600,0,0";let e=document.querySelector(`link[href="${t}"]`);if(!e){e=document.createElement("link");e.setAttribute("rel","stylesheet");e.setAttribute("href",t);document.head.appendChild(e)}}}render(){return i(n,null,this.iconURLSvg?i("div",{style:this.svgStyle,innerHTML:this.iconURLSvg}):this.iconAssetURL?i("svg",{width:"20",height:"20"},i("use",{xlinkHref:`${this.iconAssetURL}#img`,href:`${this.iconAssetURL}#img`})):this.iconURL?i("img",{src:this.iconURL}):i("span",null,this.name))}static get assetsDirs(){return["assets"]}get el(){return a(this)}};r=new WeakSet,l=async function t(e){try{if(v.has(e)){this.iconURLSvg=v.get(e)}else{const t=await window.fetch(e);if(t.status==200){this.iconURLSvg=await t.text();v.set(e,this.iconURLSvg)}}}catch(t){}const i=getComputedStyle(this.el).fontSize;this.svgStyle={fill:getComputedStyle(this.el).color,height:i,width:i}};d.style=s;const u=":host{display:block;--font-weight:var(--klevu-typography-font-weight)}span{display:inline-block;color:var(--klevu-typography-color, currentColor)}.variant-h1{font-size:var(--klevu-typography-font-size, var(--klevu-h1-size));font-weight:var(--font-weight, var(--klevu-h1-weight));line-height:var(--klevu-h1-line-height)}.variant-h2{font-size:var(--klevu-typography-font-size, var(--klevu-h2-size));font-weight:var(--font-weight, var(--klevu-h2-weight));line-height:var(--klevu-h2-line-height)}.variant-h3{font-size:var(--klevu-typography-font-size, var(--klevu-h3-size));font-weight:var(--font-weight, var(--klevu-h3-weight));line-height:var(--klevu-h3-line-height)}.variant-h4{font-size:var(--klevu-typography-font-size, var(--klevu-h4-size));font-weight:var(--font-weight, var(--klevu-h4-weight));line-height:var(--klevu-h4-line-height)}.variant-body-l,.variant-body-l-bold{font-size:var(--klevu-typography-font-size, var(--klevu-body-l-size));line-height:var(--klevu-body-l-line-height)}.variant-body-m,.variant-body-m-bold{font-size:var(--klevu-typography-font-size, var(--klevu-body-m-size));line-height:var(--klevu-body-m-line-height)}.variant-body-s,.variant-body-s-bold{font-size:var(--klevu-typography-font-size, var(--klevu-body-s-size));line-height:var(--klevu-body-s-line-height)}.variant-body-xs,.variant-body-xs-bold{font-size:var(--klevu-typography-font-size, var(--klevu-body-xs-size));line-height:var(--klevu-body-xs-line-height)}.variant-body-l,.variant-body-m,.variant-body-s,.variant-body-xs{font-weight:var(--font-weight, var(--klevu-typography-font-weight, 400))}.variant-body-l-bold,.variant-body-m-bold,.variant-body-s-bold,.variant-body-xs-bold{font-weight:var(--font-weight, var(--klevu-typography-font-weight, 600))}";const g=class{constructor(e){t(this,e);this.variant=undefined;this.fullWidth=undefined}render(){let t={};if(this.fullWidth){t.width="100%"}return i("span",{class:`variant-${this.variant}`,style:t},i("slot",null))}};g.style=u;export{d as klevu_icon,g as klevu_typography};
//# sourceMappingURL=p-fde56771.entry.js.map