"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["90143"],{24770:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HuiTodoListEditor:function(){return T}});var i,n,c=a(72153),l=a(44734),s=a(43080),r=a(69683),d=a(6454),h=(a(28706),a(62062),a(18111),a(61701),a(69085),a(26099),a(16034),a(40445)),u=a(96196),_=a(77845),p=a(22786),m=a(63533),f=a(62134),v=a(36312),y=a(1087),b=(a(38962),a(52763),a(84698)),g=a(7382),C=a(65590),A=a(82286),k=e([f]);f=(k.then?(await k)():k)[0];var E=[f.ITEM_TAP_ACTION_EDIT,f.ITEM_TAP_ACTION_TOGGLE],z=(0,m.kp)(b.H,(0,m.Ik)({title:(0,m.lq)((0,m.Yj)()),theme:(0,m.lq)((0,m.Yj)()),entity:(0,m.lq)((0,m.Yj)()),hide_completed:(0,m.lq)((0,m.zM)()),hide_create:(0,m.lq)((0,m.zM)()),hide_section_headers:(0,m.lq)((0,m.zM)()),display_order:(0,m.lq)((0,m.Yj)()),item_tap_action:(0,m.lq)((0,m.Yj)())})),T=function(e){function t(){var e;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(e=(0,r.A)(this,t,[].concat(o)))._schema=(0,p.A)(function(e,t){return[{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(C.EE).map(function(a){return{value:a,label:e("ui.panel.lovelace.editor.card.todo-list.sort_modes.".concat(a===C.EE.NONE&&t?"manual":a))}})}}},{name:"interactions",type:"expandable",flatten:!0,iconPath:"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",schema:[{name:"item_tap_action",required:!0,selector:{select:{mode:"dropdown",options:Object.values(E).map(function(t){return{value:t,label:e("ui.panel.lovelace.editor.card.todo-list.actions.".concat(t))}})}}}]}]}),e._data=(0,p.A)(function(e){return Object.assign({display_order:"none",item_tap_action:"edit"},e)}),e._computeLabelCallback=function(t){switch(t.name){case"theme":return"".concat(e.hass.localize("ui.panel.lovelace.editor.card.generic.theme")," (").concat(e.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 e.hass.localize("ui.panel.lovelace.editor.card.todo-list.".concat(t.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e._computeHelperCallback=function(t){if("hide_section_headers"===t.name)return e.hass.localize("ui.panel.lovelace.editor.card.todo-list.".concat(t.name,"_helper"))},e}return(0,d.A)(t,e),(0,s.A)(t,[{key:"setConfig",value:function(e){(0,m.vA)(e,z),this._config=e}},{key:"render",value:function(){return this.hass&&this._config?(0,u.qy)(i||(i=(0,c.A)([" ",' <ha-form .hass="','" .data="','" .schema="','" .computeLabel="','" .computeHelper="','" @value-changed="','"></ha-form> '])),(0,v.x)(this.hass,"todo")?"":(0,u.qy)(n||(n=(0,c.A)([' <ha-alert alert-type="error"> '," </ha-alert> "])),this.hass.localize("ui.panel.lovelace.editor.card.shopping-list.integration_not_loaded")),this.hass,this._data(this._config),this._schema(this.hass.localize,this._todoListSupportsFeature(C.Ed.MOVE_TODO_ITEM)),this._computeLabelCallback,this._computeHelperCallback,this._valueChanged):u.s6}},{key:"_valueChanged",value:function(e){var t=Object.assign({},e.detail.value);t.item_tap_action===f.ITEM_TAP_ACTION_EDIT&&delete t.item_tap_action,(0,y.r)(this,"config-changed",{config:t})}},{key:"_todoListSupportsFeature",value:function(e){var t,a,o=null!==(t=this._config)&&void 0!==t&&t.entity?this.hass.states[null===(a=this._config)||void 0===a?void 0:a.entity]:void 0;return!!o&&(0,A.$)(o,e)}}],[{key:"styles",get:function(){return g.U}}])}(u.WF);(0,h.Cg)([(0,_.MZ)({attribute:!1})],T.prototype,"hass",void 0),(0,h.Cg)([(0,_.wk)()],T.prototype,"_config",void 0),T=(0,h.Cg)([(0,_.EM)("hui-todo-list-card-editor")],T),o()}catch(M){o(M)}})},84698:function(e,t,a){a.d(t,{H:function(){return i}});var o=a(63533),i=(0,o.Ik)({type:(0,o.Yj)(),view_layout:(0,o.bz)(),layout_options:(0,o.bz)(),grid_options:(0,o.bz)(),visibility:(0,o.bz)(),disabled:(0,o.lq)((0,o.zM)())})}}]);
//# sourceMappingURL=90143.f535e48ab642437a.js.map