UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

23 lines 22.5 kB
/*! For license information please see 9374.d9c8a48d7634dd6d.js.LICENSE.txt */ export const __rspack_esm_id=9374;export const __rspack_esm_ids=[9374];export const __webpack_modules__={75064(e,t,i){var o=i(62826),s=i(5124),a=i(22441),r=i(2846);class l extends r.G{constructor(...e){super(...e),this.borderTop=!1}}l.styles=[...r.J,s.AH`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var( --mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family) );color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`],(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],l.prototype,"borderTop",void 0),l=(0,o.Cg)([(0,a.EM)("ha-combo-box-item")],l)},3449(e,t,i){var o=i(62826),s=i(5124),a=i(22441);class r extends s.WF{render(){return s.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}r.styles=s.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var( --mdc-typography-caption-letter-spacing, .0333333333em );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),r=(0,o.Cg)([(0,a.EM)("ha-input-helper-text")],r)},2846(e,t,i){i.d(t,{G:()=>d,J:()=>n});var o=i(62826),s=i(58168),a=i(82553),r=i(5124),l=i(22441);i(54276);const n=[a.R,r.AH`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`];class d extends s.n{renderRipple(){return"text"===this.type?r.s6:r.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled&&"link"!==this.type}"></ha-ripple>`}}d.styles=n,d=(0,o.Cg)([(0,l.EM)("ha-md-list-item")],d)},88285(e,t,i){i.a(e,async function(e,t){try{var o=i(62826),s=i(35211),a=i(5124),r=i(22441),l=i(63672),n=i(1087),d=i(22792),h=i(17894),c=(i(75064),i(47680),i(26300)),p=e([c]);c=(p.then?(await p)():p)[0];const m="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",y="M7,10L12,15L17,10H7Z";class g extends((0,h.c)(a.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),i=this.placeholder??this.label,o=this.label&&e?a.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:a.s6,s=e?this.valueRenderer?this.valueRenderer(this.value??""):a.qy`<span slot="headline">${this.value}</span>`:i?a.qy`<span slot="headline" class="placeholder"> ${i}${this.required?" *":""} </span>`:a.s6;return a.qy` <ha-combo-box-item aria-label="${(0,l.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?a.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?a.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:a.qy`<slot name="start"></slot>`} ${o}${s} ${this.unknown?a.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:a.s6} ${t?a.qy` <ha-icon-button class="clear" slot="end" @click="${this._clear}" .path="${m}"></ha-icon-button> `:a.s6} <ha-svg-icon class="arrow" slot="end" .path="${y}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,n.r)(this,"clear")}static get styles(){return[a.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"invalid",void 0),(0,o.Cg)([(0,r.P)("ha-combo-box-item",!0)],g.prototype,"item",void 0),(0,o.Cg)([(0,r.wk)(),(0,s.Fg)({context:d.D5,subscribe:!0})],g.prototype,"_i18n",void 0),g=(0,o.Cg)([(0,r.EM)("ha-picker-field")],g),t()}catch(e){t(e)}})},606(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(61701);var o=i(62826),s=i(5124),a=i(22441),r=i(63672),l=i(22786),n=i(1087),d=i(29823),h=(i(70947),i(3449),i(88285)),c=(i(67094),e([d,h]));[d,h]=c.then?(await c)():c;class p extends s.WF{render(){return this.disabled?s.qy`${this._renderField()}${this._renderHelper()}`:s.qy` <ha-dropdown placement="bottom" @wa-select="${this._handleSelect}" @wa-show="${this._handleShow}" @wa-hide="${this._handleHide}"> ${this._renderField()} ${this.options?this.options.map(e=>{const t=["string","number"].includes(typeof e);return s.qy` <ha-dropdown-item .value="${t?e:e.value}" .disabled="${!t&&(e.disabled??!1)}" .selected="${this.value===(t?e:e.value)}"> ${e.iconPath?s.qy`<ha-svg-icon slot="icon" .path="${e.iconPath}"></ha-svg-icon>`:s.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?s.qy`<div class="secondary">${e.secondary}</div>`:s.s6} </div> </ha-dropdown-item> `}):s.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return s.qy` <ha-picker-field slot="trigger" type="button" class="${this._opened?"opened":""}" compact="compact" aria-label="${(0,r.J)(this.label)}" @clear="${this._clearValue}" .label="${this.label}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" .hideClearIcon="${!this.clearable||this.required||this.disabled||!String(this.value)}"> </ha-picker-field> `}_renderHelper(){return this.helper?s.qy`<ha-input-helper-text .disabled="${this.disabled}">${this.helper}</ha-input-helper-text>`:s.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,n.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,n.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((e,t)=>{const i=void 0!==t?String(t):void 0;if(!e||!i)return i;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===i||!e&&String(t.value)===i)return e?t:t.label||t.value}return i})}}p.styles=s.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`,(0,o.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"clearable",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],p.prototype,"options",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"helper",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"value",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,a.wk)()],p.prototype,"_opened",void 0),(0,o.Cg)([(0,a.P)("ha-picker-field")],p.prototype,"_triggerField",void 0),p=(0,o.Cg)([(0,a.EM)("ha-select")],p),t()}catch(e){t(e)}})},97078(e,t,i){i.d(t,{w:()=>o});const o=(e,t,i)=>e.callService("select","select_option",{option:i},{entity_id:t})},17894(e,t,i){i.d(t,{c:()=>a});var o=i(62826),s=i(22441);const a=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,o.Cg)([(0,s.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"icon",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"image",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"placeholder",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"helper",void 0),(0,o.Cg)([(0,s.MZ)()],t.prototype,"value",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},78157(e,t,i){i.a(e,async function(e,o){try{i.r(t);i(74423),i(18111),i(61701);var s=i(62826),a=i(5124),r=i(22441),l=i(606),n=i(22675),d=i(88360),h=i(97078),c=i(784),p=i(79757),m=i(85979),y=e([l,p,m]);[l,p,m]=y.then?(await y)():y;class g extends a.WF{setConfig(e){if(!e||!e.entity)throw new Error("Entity must be specified");this._config=e}shouldUpdate(e){return(0,c.LX)(this,e)||e.has("_selectedEntityRow")}willUpdate(e){super.willUpdate(e),this.hass&&this._config&&e.get("hass")&&this.hass.states[this._config.entity]!==e.get("hass").states[this._config.entity]&&(this._selectedEntityRow=void 0)}render(){if(!this.hass||!this._config)return a.s6;const e=this.hass.states[this._config.entity];if(!e)return a.qy` <hui-warning .hass="${this.hass}"> ${(0,m.j)(this.hass,this._config.entity)} </hui-warning> `;const t=this.hass.formatEntityName(e,this._config.name);return a.qy` <hui-generic-entity-row .hass="${this.hass}" .config="${this._config}" hide-name> <ha-select .label="${t}" .value="${this._selectedEntityRow||e.state}" .options="${e.attributes.options?.map(t=>({value:t,label:this.hass.formatEntityState(e,t)}))}" .disabled="${e.state===n.Hh}" @selected="${this._handleAction}"> </ha-select> </hui-generic-entity-row> `}_handleAction(e){const t=this.hass.states[this._config.entity],i=e.detail.value;i!==t.state&&t.attributes.options.includes(i)&&((0,d.j)(this,"light"),this._selectedEntityRow=i,(0,h.w)(this.hass,t.entity_id,i).catch(e=>{}).finally(()=>setTimeout(()=>{this.hass.states[this._config.entity]===t&&(this._selectedEntityRow=void 0)},2e3)))}}g.styles=a.AH`hui-generic-entity-row{display:flex;align-items:center}ha-select{width:100%;--ha-select-min-width:0}`,(0,s.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,s.Cg)([(0,r.wk)()],g.prototype,"_config",void 0),(0,s.Cg)([(0,r.wk)()],g.prototype,"_selectedEntityRow",void 0),g=(0,s.Cg)([(0,r.EM)("hui-select-entity-row")],g),o()}catch(e){o(e)}})},82553(e,t,i){i.d(t,{R:()=>o});const o=i(5124).AH`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}@media(forced-colors:active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`},58168(e,t,i){i.d(t,{n:()=>g});var o=i(62826),s=(i(75275),i(22441)),a=i(5124);class r extends a.WF{render(){return a.qy` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" @slotchange="${this.handleTextSlotChange}"></slot> <slot class="default-slot" @slotchange="${this.handleTextSlotChange}"></slot> <slot name="headline" @slotchange="${this.handleTextSlotChange}"></slot> <slot name="supporting-text" @slotchange="${this.handleTextSlotChange}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `}handleTextSlotChange(){let e=!1,t=0;for(const i of this.textSlots)if(l(i)&&(t+=1),t>1){e=!0;break}this.multiline=e}constructor(){super(...arguments),this.multiline=!1}}function l(e){for(const t of e.assignedNodes({flatten:!0})){const e=t.nodeType===Node.ELEMENT_NODE,i=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||i)return!0}return!1}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],r.prototype,"multiline",void 0),(0,o.Cg)([(0,s.YG)(".text slot")],r.prototype,"textSlots",void 0);const n=a.AH`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`;let d=class extends r{};d.styles=[n],d=(0,o.Cg)([(0,s.EM)("md-item")],d);i(71970);var h=i(6412),c=i(7872),p=i(1024),m=i(27525);const y=(0,p.n)(a.WF);class g extends y{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(e){this.href&&(this.type="link"),super.willUpdate(e)}render(){return this.renderListItem(a.qy` <md-item> <div slot="container"> ${this.renderRipple()} ${this.renderFocusRing()} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${this.renderBody()} </md-item> `)}renderListItem(e){const t="link"===this.type;let i;switch(this.type){case"link":i=c.eu`a`;break;case"button":i=c.eu`button`;break;default:i=c.eu`li`}const o="text"!==this.type,s=t&&this.target?this.target:a.s6;return c.qy` <${i} id="item" tabindex="${this.isDisabled||!o?-1:0}" ?disabled=${this.isDisabled} role="listitem" aria-selected=${this.ariaSelected||a.s6} aria-checked=${this.ariaChecked||a.s6} aria-expanded=${this.ariaExpanded||a.s6} aria-haspopup=${this.ariaHasPopup||a.s6} class="list-item ${(0,h.H)(this.getRenderClasses())}" href=${this.href||a.s6} target=${s} @focus=${this.onFocus} >${e}</${i}> `}renderRipple(){return"text"===this.type?a.s6:a.qy` <md-ripple part="ripple" for="item" ?disabled="${this.isDisabled}"></md-ripple>`}renderFocusRing(){return"text"===this.type?a.s6:a.qy` <md-focus-ring @visibility-changed="${this.onFocusRingVisibilityChanged}" part="focus-ring" for="item" inward></md-focus-ring>`}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return a.qy` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,m.cG)())}focus(){this.listItemRoot?.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}g.shadowRootOptions={...a.WF.shadowRootOptions,delegatesFocus:!0},(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],g.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({reflect:!0})],g.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],g.prototype,"isListItem",void 0),(0,o.Cg)([(0,s.MZ)()],g.prototype,"href",void 0),(0,o.Cg)([(0,s.MZ)()],g.prototype,"target",void 0),(0,o.Cg)([(0,s.P)(".list-item")],g.prototype,"listItemRoot",void 0)}};