import{r as e,c as o,h as i,H as s}from"./p-X1TV_giC.js";import{randomString as t}from"@verdocs/js-sdk";const r='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-multiselect{width:100%;display:block;margin:0 0 10px 0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif;position:relative}verdocs-multiselect .input-wrapper{width:100%;position:relative}verdocs-multiselect .input-wrapper .icon{top:6px;right:6px;width:18px;height:18px;z-index:10;position:absolute}verdocs-multiselect .trigger{gap:3px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;border-radius:4px;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;padding:5px 32px 5px 7px;background:#ffffff;border:1px solid #707ae5}verdocs-multiselect .trigger::-webkit-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::-moz-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger:-ms-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::-ms-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .selected-option{color:white;font-size:12px;padding:2px 6px;border-radius:3px;display:inline-block;background:#46497d}verdocs-multiselect .input-label{display:block;font-weight:700;font-size:14px;margin:0 0 4px 0;color:#555570}verdocs-multiselect .verdocs-multiselect-dropdown{left:0;top:30px;width:210px;z-index:10000;position:absolute;border-radius:5px;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border:1px solid #654dcb}verdocs-multiselect .verdocs-multiselect-dropdown .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-multiselect .verdocs-multiselect-dropdown label{font-size:13px}#verdocs-multiselect-menu-items{width:200px;z-index:10000;position:absolute;border-radius:5px;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border:1px solid #654dcb}#verdocs-multiselect-menu-items .option{display:-ms-flexbox;display:flex;gap:4px;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-multiselect-menu-items label{font-size:13px}';const l=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /></svg>`;const a=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" /></svg>`;const d=class{constructor(i){e(this,i);this.selectionChanged=o(this,"selectionChanged");this.label="";this.placeholder="Select...";this.selectedOptions=[];this.showPicker=false}handleToggleOption(e,o){var i;if(e.target.checked){this.selectedOptions=[...this.selectedOptions,o.value]}else{this.selectedOptions=this.selectedOptions.filter((e=>e!==o.value))}(i=this.selectionChanged)===null||i===void 0?void 0:i.emit({selectedOptions:this.selectedOptions})}render(){const e=`verdocs-dropdown-${t(8)}`;return i(s,{key:"ac5b224bc0d5f402b63b84dea01ee4a8f79afa17",class:this.showPicker?"open":"closed"},i("label",{key:"9c3f4a162b5b68769e3bb7d811c24d7019d5c5da"},this.label?i("div",{class:"input-label"},this.label+":"):i("div",null),i("div",{key:"9c719736987f035e57add5b4e2de29dfc7206b06",class:"input-wrapper"},i("button",{key:"c7f0790945fa6a2eb5f94beb64dcf45a88efcc49",id:e,class:"trigger",value:"",onClick:()=>this.showPicker=!this.showPicker},this.selectedOptions.length===0?i("span",{class:"placeholder"},this.placeholder):this.selectedOptions.map((e=>{var o;return i("span",{class:"selected-option"},((o=this.options.find((o=>o.value===e)))===null||o===void 0?void 0:o.label)||"Unknown")}))),i("div",{key:"d4703b256d8e9c8359433dbdf64c86f9fec3c706",class:"icon",innerHTML:this.showPicker?a:l}),this.showPicker&&i("div",{key:"c53ef02457953288741486d9565f9d7fe8b0a064",class:"verdocs-multiselect-dropdown"},this.options.map(((e,o)=>i("div",{class:"option",onClick:()=>this.showPicker=false},i("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${o}`,value:e.value,checked:this.selectedOptions.includes(e.value),onInput:o=>this.handleToggleOption(o,e)}),i("label",{htmlFor:`verdocs-multi-select-option-${o}`},e.label))))))))}};d.style=r;export{d as verdocs_multiselect};
//# sourceMappingURL=p-b85ae97a.entry.js.map