"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[461,4551],{93895(t,e,n){n.d(e,{O:()=>l,T:()=>a});var o=n(88961),r=n(63200),s=n(25964),i=n(72270);const a=(0,s.xE)("list-item"),l=(0,r.Zz)((0,o.RF)({mappings:{verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),o.VO,o.tQ,t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n      <slot></slot>\n    ",(0,s.fz)("\n      slot {\n          width: 100%;\n          display: flex;\n          overflow: hidden;\n          box-sizing: border-box;\n      }\n      :host {\n        display: block;\n      }\n        ",this)}},o.y)((0,i.qu)({componentName:a,baseSelector:"slot"}))},24542(t,e,n){n.r(e),n.d(e,{ListItemClass:()=>o.O,componentName:()=>o.T});var o=n(93895);customElements.define(o.T,o.O)},7720(t,e,n){n.d(e,{T:()=>l,x:()=>p});var o=n(88961),r=n(63200),s=n(25964),i=n(93895),a=n(72270);const l=(0,s.xE)("list");class d extends((0,a.qu)({componentName:l,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n    <div class="wrapper">\n    <slot></slot>\n    <slot name="empty-state">\n      No item...\n    </slot>\n    </div>\n\t',(0,s.fz)('\n    .wrapper {\n        overflow: auto;\n        display: grid;\n        max-height: 100%;\n        width: 100%;\n      }\n\n      :host {\n        display: inline-flex;\n        width: 100%;\n      }\n      slot[name="empty-state"] {\n        justify-content: center;\n        align-items: center;\n        display: flex;\n        flex-grow: 1;\n      }\n\n      :host slot[name="empty-state"] {\n        display: none;\n      }\n      :host([empty]) slot[name="empty-state"] {\n        display: flex;\n      }\n      ::slotted(:not([slot])) {\n        width: 100%;\n      }\n        ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#t(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#e(){this.items.forEach(t=>{let e=t;e.localName!==i.O.componentName&&(e=t.querySelector(i.O.componentName));const n="tiles"===this.variant?"tile":"row";e?.setAttribute("variant",n)})}init(){super.init?.(),(0,s.Ge)(this,()=>{this.#t(),this.#e(),this.#n()})}get isReadOnly(){return"true"===this.getAttribute("readonly")}#n(){this.items.forEach(t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("variant"===t?this.#e():"readonly"===t&&this.#n())}}const p=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},maxRowItems:{property:"max-row-items"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),o.VO,o.tQ)(d)},45400(t,e,n){n.r(e),n.d(e,{ListClass:()=>o.x,componentName:()=>o.T}),n(24542);var o=n(7720);customElements.define(o.T,o.x)}}]);
//# sourceMappingURL=descope-list.js.map