"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./query-assigned-elements-8EurZY45.js"),n=require("./property-DYTC_2-m.js"),d=require("./class-map-DTzB8z-1.js");require("./icon.js");const l='.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-ripple-surface:before,.mdc-ripple-surface:after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface:after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded:after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded:after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface:before,.mdc-ripple-surface:after{top:0%;left:0%;width:100%;height:100%}.mdc-ripple-surface.mdc-ripple-upgraded:after{width:var(--mdc-ripple-fg-size, 50%);height:var(--mdc-ripple-fg-size, 50%)}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover:before,.mdc-ripple-surface.mdc-ripple-surface--hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused:before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus:before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active:after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface:after,.mdc-ripple-surface:before{border-radius:0 16px 16px 0}.itemContent{padding:0 32px 0 var(--indent);margin-right:16px}.itemContent:hover{cursor:pointer;background-color:var(--mdc-theme-surface-neutral-highlight-hover);border-radius:0 16px 16px 0}.selected{background-color:var(--mdc-theme-surface-primary-highlight);color:var(--mdc-theme-primary);border-radius:0 16px 16px 0}.selected:hover{background-color:var(--mdc-theme-surface-primary-highlight-hover)}.mainContent{display:flex;flex-direction:row;padding:4px 0}[name=label]::slotted(*){font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);letter-spacing:.25px;padding-left:16px}[name=extraContent]::slotted(*){padding-left:64px;padding-bottom:4px;margin-top:-4px;letter-spacing:.4px;color:var(--mdc-theme-text-secondary-on-background);font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);font-weight:var(--mdc-typography-caption-font-weight);line-height:var(--mdc-typography-caption-line-height)}.hidden{display:none}.visible{display:flex;flex-direction:column}.endOfNest{padding:8px;padding-left:calc(var(--indent) + 20px);letter-spacing:.4px;-webkit-user-select:none;user-select:none;color:var(--mdc-theme-text-disabled-on-background);font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);font-weight:var(--mdc-typography-caption-font-weight);line-height:var(--mdc-typography-caption-line-height)}.arrowIcon{color:var(--mdc-theme-text-primary-on-background)}.open{transition:transform .1s ease-out;transform:rotate(90deg)}.close{transition:transform .1s ease-in;transform:rotate(0)}';var m=Object.defineProperty,f=Object.getOwnPropertyDescriptor,o=(c,r,a,i)=>{for(var e=i>1?void 0:i?f(r,a):r,p=c.length-1,s;p>=0;p--)(s=c[p])&&(e=(i?s(r,a,e):s(e))||e);return i&&e&&m(r,a,e),e};exports.CovalentTreeListItem=class extends t.s{constructor(){super(...arguments),this.isOpen=!1,this.icon="",this.indentLevel=0,this.indentMultiple=16}render(){const r={hidden:!this.isOpen,visible:this.isOpen},a={open:this.isOpen,close:!this.isOpen},i="arrow_right",e=t.x`<cv-icon>${this.icon}</cv-icon>`,p=t.x`<cv-icon class="${d.o(a)} arrowIcon"
      >${i}</cv-icon
    >`;return t.x`
      <div
        class="itemContent mdc-ripple-surface"
        @click="${this._handleClick}"
        style="--indent:${this.indentLevel*this.indentMultiple+8}px"
      >
        <div class="mainContent">
          ${p} ${e}
          <slot name="label"></slot>
        </div>
        <slot name="extraContent"></slot>
      </div>
      <slot name="nest" class="${d.o(r)}">
        <div
          class="endOfNest"
          style="--indent:${this.indentLevel*this.indentMultiple+this.indentMultiple}px"
        >
          No results
        </div>
      </slot>
    `}_handleClick(){this.isOpen=!this.isOpen;const r=new CustomEvent("select",{detail:{message:`Emitting an event from ${this}`},bubbles:!0,composed:!0});this.dispatchEvent(r)}};exports.CovalentTreeListItem.styles=[t.i`
      ${t.r(l)}
    `];o([n.n({type:Boolean})],exports.CovalentTreeListItem.prototype,"isOpen",2);o([n.n({type:String})],exports.CovalentTreeListItem.prototype,"icon",2);o([n.n({type:Number})],exports.CovalentTreeListItem.prototype,"indentLevel",2);o([n.n({type:Number})],exports.CovalentTreeListItem.prototype,"indentMultiple",2);exports.CovalentTreeListItem=o([t.e("cv-tree-list-item")],exports.CovalentTreeListItem);const u=exports.CovalentTreeListItem;exports.default=u;
