export const __rspack_esm_id="90143";export const __rspack_esm_ids=["90143"];export const __webpack_modules__={24770(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HuiTodoListEditor:()=>E});a(18111),a(61701);var o=a(62826),s=a(96196),l=a(97735),c=a(22786),r=a(63533),n=a(62134),d=a(36312),_=a(1087),h=a(38962),p=a(52763),m=a(84698),u=a(7382),v=a(65590),b=a(82286),g=e([h,p,n]);[h,p,n]=g.then?(await g)():g;const y="M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z",C=[n.ITEM_TAP_ACTION_EDIT,n.ITEM_TAP_ACTION_TOGGLE],f=(0,r.kp)(m.H,(0,r.Ik)({title:(0,r.lq)((0,r.Yj)()),theme:(0,r.lq)((0,r.Yj)()),entity:(0,r.lq)((0,r.Yj)()),hide_completed:(0,r.lq)((0,r.zM)()),hide_create:(0,r.lq)((0,r.zM)()),hide_section_headers:(0,r.lq)((0,r.zM)()),display_order:(0,r.lq)((0,r.Yj)()),item_tap_action:(0,r.lq)((0,r.Yj)())}));class E extends s.WF{setConfig(e){(0,r.vA)(e,f),this._config=e}render(){return this.hass&&this._config?s.qy` ${(0,d.x)(this.hass,"todo")?"":s.qy` <ha-alert alert-type="error"> ${this.hass.localize("ui.panel.lovelace.editor.card.shopping-list.integration_not_loaded")} </ha-alert> `} <ha-form .hass="${this.hass}" .data="${this._data(this._config)}" .schema="${this._schema(this.hass.localize,this._todoListSupportsFeature(v.Ed.MOVE_TODO_ITEM))}" .computeLabel="${this._computeLabelCallback}" .computeHelper="${this._computeHelperCallback}" @value-changed="${this._valueChanged}"></ha-form> `:s.s6}_valueChanged(e){const t={...e.detail.value};t.item_tap_action===n.ITEM_TAP_ACTION_EDIT&&delete t.item_tap_action,(0,_.r)(this,"config-changed",{config:t})}_todoListSupportsFeature(e){const t=this._config?.entity?this.hass.states[this._config?.entity]:void 0;return!!t&&(0,b.$)(t,e)}static get styles(){return u.U}constructor(...e){super(...e),this._schema=(0,c.A)((e,t)=>[{name:"title",selector:{text:{}}},{name:"entity",selector:{entity:{domain:"todo"}}},{name:"theme",selector:{theme:{}}},{name:"hide_completed",selector:{boolean:{}}},{name:"hide_create",selector:{boolean:{}}},{name:"hide_section_headers",selector:{boolean:{}}},{name:"display_order",selector:{select:{options:Object.values(v.EE).map(a=>({value:a,label:e(`ui.panel.lovelace.editor.card.todo-list.sort_modes.${a===v.EE.NONE&&t?"manual":a}`)}))}}},{name:"interactions",type:"expandable",flatten:!0,iconPath:y,schema:[{name:"item_tap_action",required:!0,selector:{select:{mode:"dropdown",options:Object.values(C).map(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.todo-list.actions.${t}`)}))}}}]}]),this._data=(0,c.A)(e=>({display_order:"none",item_tap_action:"edit",...e})),this._computeLabelCallback=e=>{switch(e.name){case"theme":return`${this.hass.localize("ui.panel.lovelace.editor.card.generic.theme")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.optional")})`;case"hide_completed":case"hide_create":case"hide_section_headers":case"display_order":case"item_tap_action":return this.hass.localize(`ui.panel.lovelace.editor.card.todo-list.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}},this._computeHelperCallback=e=>{if("hide_section_headers"===e.name)return this.hass.localize(`ui.panel.lovelace.editor.card.todo-list.${e.name}_helper`)}}}(0,o.Cg)([(0,l.MZ)({attribute:!1})],E.prototype,"hass",void 0),(0,o.Cg)([(0,l.wk)()],E.prototype,"_config",void 0),E=(0,o.Cg)([(0,l.EM)("hui-todo-list-card-editor")],E),i()}catch(e){i(e)}})},84698(e,t,a){a.d(t,{H:()=>o});var i=a(63533);const o=(0,i.Ik)({type:(0,i.Yj)(),view_layout:(0,i.bz)(),layout_options:(0,i.bz)(),grid_options:(0,i.bz)(),visibility:(0,i.bz)(),disabled:(0,i.lq)((0,i.zM)())})}};
//# sourceMappingURL=90143.63fbb3465b2e8b3a.js.map