import{p as e,H as a,c as l,h as t,t as s}from"./p-Bpcl2TqF.js";import{i,d as n,t as d}from"./p-94ZtGp9D.js";const r=()=>`:host{display:block}.tree-view{font-family:var(--ifx-font-family, sans-serif);font-size:14px;color:var(--ifx-color-text, #1a1a1a);display:flex;flex-wrap:wrap;flex-direction:column;overflow-x:auto;overflow-y:hidden}.tree-view__label{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}`;const f=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.ifxTreeViewExpandAllChange=l(this,"ifxTreeViewExpandAllChange",7);this.ifxTreeViewDisableAllChange=l(this,"ifxTreeViewDisableAllChange",7)}get el(){return this}label;disableAllItems=false;expandAllItems=false;ariaLabel;ifxTreeViewExpandAllChange;ifxTreeViewDisableAllChange;handleExpandAllItemsChange(e){this.ifxTreeViewExpandAllChange.emit(e)}handleDisableAllItemsChange(e){this.ifxTreeViewDisableAllChange.emit(e)}handleSlotRef=e=>{if(e){if(this.disableAllItems){e.setAttribute("data-disable-all-items","true")}else{e.removeAttribute("data-disable-all-items")}if(this.expandAllItems){e.setAttribute("data-expand-all-items","true")}else{e.removeAttribute("data-expand-all-items")}}};async componentDidLoad(){if(!i(this.el)){const e=n();d("ifx-tree-view",await e)}}render(){return t("div",{key:"3785ae5864bb9299362cdd0310172d47cc9e8056",class:`tree-view ${this.disableAllItems?" tree-view--disabled":""}`,role:"tree","aria-label":this.ariaLabel},this.label&&this.label.trim()!==""&&t("div",{key:"4fd358ae37cf561d60dd16e54acf315ab0c104c4",class:"tree-view__label"},this.label),t("slot",{key:"05e1f4f6d2d3cfb1c3e5d6f7843330d00a94219a",ref:this.handleSlotRef}))}static get watchers(){return{expandAllItems:[{handleExpandAllItemsChange:0}],disableAllItems:[{handleDisableAllItemsChange:0}]}}static get style(){return r()}},[769,"ifx-tree-view",{label:[1],disableAllItems:[4,"disable-all-items"],expandAllItems:[4,"expand-all-items"],ariaLabel:[1,"aria-label"]},undefined,{expandAllItems:[{handleExpandAllItemsChange:0}],disableAllItems:[{handleDisableAllItemsChange:0}]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ifx-tree-view"];e.forEach((e=>{switch(e){case"ifx-tree-view":if(!customElements.get(s(e))){customElements.define(s(e),f)}break}}))}const c=f;const h=o;export{c as IfxTreeView,h as defineCustomElement};
//# sourceMappingURL=ifx-tree-view.js.map