import{__decorate as i}from"tslib";import{html as t}from"lit";import{property as s,customElement as e}from"lit/decorators.js";import{s as n}from"./nile-list-item.css.esm.js";import{N as a}from"../internal/nile-element.esm.js";import{H as r}from"../internal/slot.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let l=class extends a{constructor(){super(...arguments),this.hasSlotController=new r(this,"preffix","heading","subheading"),this.iconName="",this.iconSize=14,this.heading="",this.subHeading=""}static get styles(){return[n]}handleClick(i){this.emit("nile-list-item-click",{heading:this.heading,subheading:this.subHeading})}render(){return t`
      ${this.iconName||this.hasSlotController.test("preffix")?t` <slot name="preffix" part="preffix" class="preffix__icon">
            <nile-icon
              name="${this.iconName}"
              size="${this.iconSize}"
              method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"
            ></nile-icon>
          </slot>`:""}

      <div class="content__wrapper" part="content__wrapper">
        ${this.heading||this.hasSlotController.test("heading")?t` <slot class="heading" part="heading" name="heading"
              >${this.heading}</slot
            >`:""}
        ${this.subHeading||this.hasSlotController.test("subheading")?t` <slot class="subheading" part="subheading" name="subheading"
              >${this.subHeading}</slot
            >`:"\n          "}
      </div>

      <slot @click="${this.handleClick}" class="list__item" part="base"> </slot>
      <slot name="suffix" part="suffix" class="list-item__suffix">
      </slot>
    `}};i([s({type:String,attribute:"icon-name"})],l.prototype,"iconName",void 0),i([s({type:Number,attribute:"icon-size"})],l.prototype,"iconSize",void 0),i([s({type:String,attribute:"heading"})],l.prototype,"heading",void 0),i([s({type:String,attribute:"sub-heading"})],l.prototype,"subHeading",void 0),l=i([e("nile-list-item")],l);export{l as N};
