import{r as e,c as i,h as t,H as s,g as a}from"./p-a6030c6e.js";const r=':host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;cursor:pointer;white-space:nowrap;font-family:"Nunito Sans", "Carbona", "Tahoma", "Helvetica", "Arial", sans-serif;font-weight:600}:host(.chip){border-radius:8px;padding:3px 8px}:host(.chip--primary){background:#e8f2ff;color:#3f7de8}:host(.chip--click.chip--primary:hover){background:#d1e3fa;color:#125ad5}:host(.chip--watermelon){background:#fb5a8b;color:#ffffff}:host(.chip--default){background:#f8fbfb;color:#8ca0b3}:host(.chip--danger){background:#ffa5a5;color:#ff4c4c}:host(.chip--click.chip--danger:hover){background:#fccccc;color:#6a2026}:host(.chip--filter){background:#125ad5;color:#ffffff}:host(.chip--click.chip--filter:hover){background:#0747a6;color:#ffffff}:host(.chip--standard){height:24px;font-size:0.75rem}:host(.chip--tall){height:32px;font-size:0.875rem}.chip__delete{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:6px;cursor:pointer}.chip__icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-right:4px}';const c=r;const h=class{constructor(t){e(this,t);this.bdsDelete=i(this,"bdsDelete",7);this.icon=undefined;this.size="standard";this.variant="default";this.danger=false;this.filter=false;this.clickable=false;this.deletable=false;this.disabled=false}handleClickDelete(e){if(!this.deletable||this.disabled)return;e.preventDefault();this.bdsDelete.emit({id:this.element.id})}getClickClass(){return this.clickable?{"chip--click":true}:{}}getSizeClass(){return this.size==="standard"?{"chip--standard":true}:{"chip--tall":true}}getStateClass(){if(this.disabled){return{"chip--default":true}}if(this.danger){return{"chip--danger":true}}if(this.filter){return{"chip--filter":true}}if(this.variant==="primary"){return{"chip--primary":true}}if(this.variant==="watermelon"){return{"chip--watermelon":true}}return{"chip--default":true}}render(){return t(s,{key:"87c360c0e320040612a572917173793abe572f59",class:Object.assign(Object.assign(Object.assign({chip:true},this.getClickClass()),this.getStateClass()),this.getSizeClass())},this.icon&&t("div",{key:"72b98909f8b0f20a5d970b86307eb85fb623f778",class:"chip__icon"},t("bds-icon",{key:"5ba4a201b74c35377f8a961c432f10f01d4f79fb",size:"x-small",name:this.icon})),t("slot",{key:"869d603003cb901d94d90d26f176987f1ec30b74"}),this.deletable&&t("div",{key:"b7dec67a7e888d59adac2a8e1c8f8006a153b3d8",class:"chip__delete",onClick:this.handleClickDelete.bind(this)},t("bds-icon",{key:"43082b89f628024763d4f0a8e90387400b99da3b",size:"x-small",theme:"solid",name:"error"})))}get element(){return a(this)}};h.style=c;export{h as bds_chip};
//# sourceMappingURL=p-6b87970b.entry.js.map