export const __rspack_esm_id=71539;export const __rspack_esm_ids=[71539];export const __webpack_modules__={37342(t,s,e){e.a(t,async function(t,i){try{e.r(s);var a=e(15697),o=e(358),r=e(57527),n=e(79224),p=e(49938),_=e(80189),h=e(18279),d=e(15466),l=e(88457),c=e(75763),y=t([h,d,l]);[h,d,l]=y.then?(await y)():y;class b extends r.WF{willUpdate(t){if(super.willUpdate(t),!t.has("stateObj")||!this.stateObj)return;const s=t.get("stateObj");s&&s.entity_id===this.stateObj.entity_id||this._getPipeline()}async _getPipeline(){this._pipeline=void 0,this._errorLoadAssist=void 0;const t=this.stateObj.entity_id;try{const s=await(0,c.mp)(this._api,t);this.stateObj&&t===this.stateObj.entity_id&&(this._pipeline=s)}catch(s){if(this.stateObj&&t!==this.stateObj.entity_id)return;"not_found"===s.code?this._errorLoadAssist="not_found":(this._errorLoadAssist="unknown",console.error(s))}}render(){return this._localize&&this.stateObj?r.qy` ${this._errorLoadAssist?r.qy`<ha-alert alert-type="error"> ${this._localize(`ui.dialogs.voice_command.${this._errorLoadAssist}_error_load_assist`)} </ha-alert>`:this._pipeline?r.qy` <ha-assist-chat .pipeline=${this._pipeline} disable-speech></ha-assist-chat> `:r.qy`<div class="pipelines-loading"> <ha-spinner size="large"></ha-spinner> </div>`} `:r.s6}}b.styles=r.AH`:host{flex:1;display:flex}ha-assist-chat{flex:1;min-height:400px}`,(0,a.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"stateObj",void 0),(0,a.Cg)([(0,n.wk)()],b.prototype,"_pipeline",void 0),(0,a.Cg)([(0,n.wk)()],b.prototype,"_errorLoadAssist",void 0),(0,a.Cg)([(0,n.wk)(),(0,p.IW)()],b.prototype,"_localize",void 0),(0,a.Cg)([(0,n.wk)(),(0,o.Fg)({context:_.Ie,subscribe:!0})],b.prototype,"_api",void 0),b=(0,a.Cg)([(0,n.EM)("more-info-conversation")],b),i()}catch(t){i(t)}})}};
//# sourceMappingURL=71539.d1320cf609eef107.js.map