/*!
 * Built with Stencil
 * By PostNord.
 */
import{transformTag as e,proxyCustomElement as t,HTMLElement as n,createEvent as s,h as i,Host as a}from"@stencil/core/internal/client";import{u as l}from"./helpers.js";import{d as o}from"./pn-icon2.js";const c=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.segmentHover=s(this,"segmentHover",7)}id="pn-segment-"+l();get hostElement(){return this}label;name;value;selected=!1;segmentid=this.id;icon;disabled=!1;segmentHover;handleHover(e){this.segmentHover.emit(e)}render(){return i(a,{key:"b98bb414de20d14fc2ee9d087be192d5f17bf1f9",onMouseEnter:e=>this.handleHover(e)},i("input",{key:"0b6117d85bb547c249a402cc26494355f3dc3e95",class:"pn-segment",id:this.segmentid,name:this.name,checked:this.selected,type:"radio",value:this.value,disabled:this.disabled}),i("label",{key:"8570c7c62ccfcfdd5dca9d8e1a6e016ca9c6a304",htmlFor:this.segmentid,class:"pn-segment-label"},this.icon&&i("pn-icon",{key:"e10a1ea4ca26f71e6caadbeeda6bf5d68cfc266f",icon:this.icon,color:"blue700"}),i("span",{key:"8ec12157e0ca6f62772743e06beefc677f9f9f87",class:"pn-segment-text"},this.label,i("slot",{key:"6342dfb17f71cae05318a3c19a19fdb6e46bb157"}))))}static get style(){return`${e("pn-segment")}{position:relative;color:#005d92;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}${e("pn-segment")}:last-of-type{margin-right:0}${e("pn-segment")} .pn-segment{cursor:pointer;margin:0;padding:0;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}${e("pn-segment")} .pn-segment:disabled{cursor:not-allowed}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label{color:#5e554a}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label ${e("pn-icon")} .pn-icon-svg path{fill:#5e554a}${e("pn-segment")} .pn-segment-label{height:100%;width:100%;padding:0.5em;border-radius:3em;font-weight:500;border:0.0625em solid transparent;display:inline-flex;gap:0.5em;align-items:center;-webkit-tap-highlight-color:transparent}`}},[772,"pn-segment",{label:[1],name:[1],value:[1],selected:[4],segmentid:[1],icon:[1],disabled:[4]}]),r=c,p=function(){"undefined"!=typeof customElements&&["pn-segment","pn-icon"].forEach((t=>{switch(t){case"pn-segment":customElements.get(e(e(t)))||customElements.define(e(e(t)),c);break;case"pn-icon":customElements.get(e(e(t)))||o()}}))};export{r as PnSegment,p as defineCustomElement}