import{r as t,h as e,H as i}from"./p-23a36bb6.js";import"./p-baec56c9.js";import{C as s}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"@sankhyalabs/core";import{i as a}from"./p-a61fdd20.js";import"./p-30ffb9ed.js";const l=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1,this.size=void 0,this.structural=!1}toggleExpandItem(){var t,e;this._expanded=!this._expanded,null===(e=null===(t=this.expandButtonRef.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.blur()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){s.applyVarsGrid(this._element,this._slot.children[0])}render(){return e(i,{class:`box_split-item ${this._expanded?"expanded__item":""} ${this.structural?"structural__item":"content__item"}`,ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("slot",{name:"leftButtons"}),e("div",{class:"ez-split-item--header-title"},this.label&&e("h3",{class:"ez-text ez-text--primary ez-title ez-title--medium ez-margin--small",title:this.label},this.label)),e("div",{class:"ez-split-item--header-buttons"},e("slot",{name:"rightButtons"}),this.enableExpand&&e("ez-button",{ref:t=>this.expandButtonRef=t,size:"small",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this.i18n(this._expanded?"app.collapse":"app.expand")}))),e("div",{class:"ez-split-item--content grid_height-0",ref:t=>this._slot=t},e("slot",null)))}};l.style=".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";export{l as ez_split_item}