export const __rspack_esm_id="25897";export const __rspack_esm_ids=["25897"];export const __webpack_modules__={86616(e,a,o){o.d(a,{j:()=>i});var t=o(83938);const i=async(e,a,o,i)=>{let s={type:a};const r=await(0,t.l)(a);if(r&&r.getStubConfig){const a=await r.getStubConfig(e,o,i);s={...s,...a}}return s}},59152(e,a,o){o.a(e,async function(e,t){try{o.r(a),o.d(a,{HuiCreateDialogHeaderFooter:()=>_});o(18111),o(61701);var i=o(62826),s=o(96196),r=o(97735),n=o(1087),c=o(18350),d=(o(93444),o(72554)),l=o(14503),p=o(78468),h=o(86616),g=e([c,d]);[c,d]=g.then?(await g)():g;class _ extends s.WF{async showDialog(e){this._params=e,this._open=!0}closeDialog(){return this._open=!1,!0}_dialogClosed(){this._params=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?s.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" header-title="${this.hass.localize("ui.panel.lovelace.editor.header-footer.choose_header_footer",{type:this.hass.localize(`ui.panel.lovelace.editor.header-footer.${this._params.type}`)})}" @keydown="${this._ignoreKeydown}" @closed="${this._dialogClosed}"> <div class="elements"> ${p.o.map((e,a)=>s.qy` <ha-card role="button" tabindex="0" aria-labelledby="${"card-name-"+a}" outlined .type="${e.type}" @click="${this._handleHeaderFooterPicked}" @keyDown="${this._handleHeaderFooterPicked}" ?autofocus="${0===a}"> <ha-svg-icon .path="${e.icon}"></ha-svg-icon> <div .id="${"card-name-"+a}" role="none presentation"> ${this.hass.localize(`ui.panel.lovelace.editor.header-footer.types.${e.type}.name`)} </div> </ha-card> `)} </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${this._cancel}"> ${this.hass.localize("ui.common.cancel")} </ha-button> </ha-dialog-footer> </ha-dialog> `:s.s6}async _handleHeaderFooterPicked(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key)return;const a=e.currentTarget.type;let o={type:a};this.hass&&(o=await(0,h.j)(this.hass,a,this._params?.entities||[],[])),this._params.pickHeaderFooter(o),this.closeDialog()}_ignoreKeydown(e){e.stopPropagation()}_cancel(e){e&&e.stopPropagation(),this.closeDialog()}static get styles(){return[l.nA,s.AH`ha-dialog{--dialog-content-padding:2px 24px 20px 24px;--dialog-z-index:6}.elements{display:flex;flex-wrap:wrap}.spinner,ha-card{width:calc(50% - 8px);text-align:center;margin:4px}ha-card{box-sizing:border-box;padding:8px;color:var(--secondary-text-color);font-size:var(--ha-font-size-l);cursor:pointer}ha-svg-icon{padding-bottom:4px;--mdc-icon-size:38px}`]}constructor(...e){super(...e),this._open=!1}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],_.prototype,"_params",void 0),(0,i.Cg)([(0,r.wk)()],_.prototype,"_open",void 0),_=(0,i.Cg)([(0,r.EM)("hui-dialog-create-headerfooter")],_),t()}catch(e){t(e)}})},78468(e,a,o){o.d(a,{o:()=>t});const t=[{type:"graph",icon:"M4 19V20H22V22H2V2H4V17C7 17 10 15 12.1 11.4C15.1 6.4 18.4 4 22 4V6C19.2 6 16.5 8.1 13.9 12.5C11.3 16.6 7.7 19 4 19Z"},{type:"buttons",icon:"M13 5C15.21 5 17 6.79 17 9C17 10.5 16.2 11.77 15 12.46V11.24C15.61 10.69 16 9.89 16 9C16 7.34 14.66 6 13 6S10 7.34 10 9C10 9.89 10.39 10.69 11 11.24V12.46C9.8 11.77 9 10.5 9 9C9 6.79 10.79 5 13 5M20 20.5C19.97 21.32 19.32 21.97 18.5 22H13C12.62 22 12.26 21.85 12 21.57L8 17.37L8.74 16.6C8.93 16.39 9.2 16.28 9.5 16.28H9.7L12 18V9C12 8.45 12.45 8 13 8S14 8.45 14 9V13.47L15.21 13.6L19.15 15.79C19.68 16.03 20 16.56 20 17.14V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.11 2.9 14 4 14H8V12L4 12L4 4H20L20 12H18V14H20V13.96L20.04 14C21.13 14 22 13.09 22 12V4C22 2.9 21.11 2 20 2Z"},{type:"picture",icon:"M20,5A2,2 0 0,1 22,7V17A2,2 0 0,1 20,19H4C2.89,19 2,18.1 2,17V7C2,5.89 2.89,5 4,5H20M5,16H19L14.5,10L11,14.5L8.5,11.5L5,16Z"}]}};
//# sourceMappingURL=25897.c7ce75776dc4851f.js.map