"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[54957],{2467:function(t,e,n){var i,r=n(97058),a=n(56245),o=function(t){return t.callWS({type:"zone/list"})},s=function(t,e){return t.callWS((0,r.A)({type:"zone/create"},e))},u=function(t,e,n){return t.callWS((0,r.A)({type:"zone/update",zone_id:e},n))},c=function(t,e){return t.callWS({type:"zone/delete",zone_id:e})},l=function(t){i=t,(0,a.oo)("/config/zone/new")},f=function(){var t=i;return i=void 0,t};n.d(e,{G5:function(){return u},Rz:function(){return l},TW:function(){return s},YC:function(){return o},Yx:function(){return c},kg:function(){return f}})},28252:function(t,e,n){n.a(t,async function(t,i){try{n.r(e);var r,a,o,s,u=n(28430),c=n(57567),l=n(25979),f=n(12463),h=n(16472),p=(n(28706),n(15697)),d=n(358),y=n(57527),b=n(51209),_=n(90789),v=n(49938),g=n(67259),A=n(148),m=n(24034),z=n(98747),k=n(68014),j=n(80189),C=n(2467),O=t([z,k]);[z,k]=O.then?(await O)():O;var W=function(t){function e(){var t;(0,c.A)(this,e);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=(0,h.A)(this,e,[].concat(i)))._entityArray=(0,_.A)(function(t){return[t]}),t}return(0,f.A)(e,t),(0,l.A)(e,[{key:"render",value:function(){var t;if(!this._localize||!this.stateObj)return y.s6;var e=(0,m.H)(this.stateObj,this._states),n="number"==typeof this.stateObj.attributes.latitude&&"number"==typeof this.stateObj.attributes.longitude;return(0,y.qy)(r||(r=(0,u.A)([" "," "," "])),e?(0,y.qy)(a||(a=(0,u.A)([" <ha-map .entities="," auto-fit></ha-map> "])),this._entityArray(this.stateObj.entity_id)):"",null!==(t=this._user)&&void 0!==t&&t.is_admin&&n?(0,y.qy)(o||(o=(0,u.A)([' <div class="actions"> <ha-button appearance="plain" size="s" @click=',"> "," </ha-button> </div> "])),this._handleAction,this._localize("ui.dialogs.more_info_control.person.create_zone")):"")}},{key:"_handleAction",value:function(){(0,C.Rz)({latitude:this.stateObj.attributes.latitude,longitude:this.stateObj.attributes.longitude}),(0,A.r)(this,"hass-more-info",{entityId:null})}}])}(y.WF);W.styles=(0,y.AH)(s||(s=(0,u.A)([".flex{justify-content:space-between;display:flex}.actions{margin:var(--ha-space-2) 0;text-align:right}ha-map{margin-top:var(--ha-space-4);margin-bottom:var(--ha-space-4)}"]))),(0,p.Cg)([(0,b.MZ)({attribute:!1})],W.prototype,"stateObj",void 0),(0,p.Cg)([(0,b.wk)(),(0,v.IW)()],W.prototype,"_localize",void 0),(0,p.Cg)([(0,b.wk)(),(0,d.Fg)({context:j.iN,subscribe:!0})],W.prototype,"_states",void 0),(0,p.Cg)([(0,b.wk)(),(0,d.Fg)({context:j.WF,subscribe:!0}),(0,g.p)({transformer:function(t){return t.user}})],W.prototype,"_user",void 0),W=(0,p.Cg)([(0,b.EM)("more-info-person")],W),i()}catch(w){i(w)}})}}]);
//# sourceMappingURL=54957.609dce018d4b1425.js.map