import{r as t,c as n,h as e,H as s}from"./p-c1e62c18.js";const i=class{constructor(e){t(this,e),this.change=n(this,"change",7),this.editable=!1,this.value=[],this.options=[]}render(){const{disabled:t,editable:n,options:i,value:a}=this;return e(s,null,n?i.map((n=>e("dvn-button",{disabled:t,leaned:!0,scale:"small",shape:"rounded",tint:a.includes(n.value)?"primary":"neutral",view:a.includes(n.value)?"solid":"outline",onClick:t=>{t.stopPropagation(),this.change.emit(function(t=[],n){return t.indexOf(n)>-1?t.filter((t=>t!==n)):[...t,n]}(this.value,n.value))}},n.label))):a.map((t=>{var n;return e("dvn-button",{leaned:!0,scale:"small",shape:"rounded",view:"outline",tagMode:!0},(null===(n=i.find((n=>n.value===t)))||void 0===n?void 0:n.label)||t)})))}};i.style="dvn-tag-cloud dvn-button{margin-right:4px}";export{i as dvn_tag_cloud}