export const __rspack_esm_id="64522";export const __rspack_esm_ids=["64522"];export const __webpack_modules__={26571(i,e,o){o.d(e,{Al:()=>n,KY:()=>s,PN:()=>l,dG:()=>d,jm:()=>r,m7:()=>p,sR:()=>h,t1:()=>a,t2:()=>g,x:()=>f,yu:()=>_});var t=o(95350);const s=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],n=["reauth"],c={"HA-Frontend-Base":`${location.protocol}//${location.host}`},a=(i,e,o)=>i.callApi("POST","config/config_entries/flow",{handler:e,show_advanced_options:Boolean(i.userData?.showAdvanced),entry_id:o},c),l=(i,e)=>i.callApi("GET",`config/config_entries/flow/${e}`,void 0,c),r=(i,e,o)=>i.callApi("POST",`config/config_entries/flow/${e}`,o,c),d=(i,e,o)=>i.callWS({type:"config_entries/ignore_flow",flow_id:e,title:o}),h=(i,e)=>i.callApi("DELETE",`config/config_entries/flow/${e}`),_=(i,e)=>i.callApi("GET","config/config_entries/flow_handlers"+(e?`?type=${e}`:"")),g=i=>i.sendMessagePromise({type:"config_entries/flow/progress"}),f=(i,e)=>i.connection.subscribeMessage(i=>e(i),{type:"config_entries/flow/subscribe"}),p=(i,e)=>e.context.title_placeholders&&0!==Object.keys(e.context.title_placeholders).length?i(`component.${e.handler}.config.flow_title`,e.context.title_placeholders)||("name"in e.context.title_placeholders?e.context.title_placeholders.name:(0,t.p$)(i,e.handler)):(0,t.p$)(i,e.handler)},76559(i,e,o){o.d(e,{X:()=>s,n:()=>n});var t=o(1087);const s=(i,e)=>{(0,t.r)(i,"show-dialog",{dialogTag:"dialog-add-integration",dialogImport:()=>Promise.all([o.e("92769"),o.e("50672")]).then(o.bind(o,60051)),dialogParams:e})},n=(i,e)=>{(0,t.r)(i,"show-dialog",{dialogTag:"dialog-yaml-integration",dialogImport:()=>o.e("24096").then(o.bind(o,95683)),dialogParams:e})}},38865(i,e,o){o.r(e),o.d(e,{HuiDiscoveredDevicesCard:()=>g});o(44114),o(18111),o(22489),o(7588);var t=o(62826),s=o(96196),n=o(97735),c=o(1087),a=(o(76776),o(22573),o(80933),o(32248),o(26571)),l=o(54706),r=o(76559),d=o(37544),h=o(97176),_=o(51989);class g extends((0,l.E)(s.WF)){hassSubscribe(){return[(0,a.x)(this.hass,i=>{if(0===i.length)return void(this._discoveredFlows=[]);let e=!1;const o=[];if(i.forEach(i=>{"removed"!==i.type?null!==i.type&&"added"!==i.type||(null===i.type&&(e=!0),a.KY.includes(i.flow.context.source)&&o.push(i.flow)):this._discoveredFlows=this._discoveredFlows.filter(e=>e.flow_id!==i.flow_id)}),!o.length&&!e)return;const t=e?[]:this._discoveredFlows;this._discoveredFlows=[...t,...o]})]}setConfig(i){this._config=i}getCardSize(){return this._config?.vertical?2:1}getGridOptions(){let i=6,e=1;return this._config?.vertical&&(e++,i=3),{columns:6,rows:e,min_columns:i,min_rows:e}}async _handleAction(i){if("tap"===i.detail.action&&!(0,h.h)(this._config?.tap_action))return await this.hass.loadFragmentTranslation("config"),void(0,r.X)(this,{brand:"_discovered"});(0,d.$)(this,this.hass,this._config,i.detail.action)}get _hasCardAction(){return!this._config?.tap_action||(0,h.h)(this._config?.tap_action)||(0,h.h)(this._config?.hold_action)||(0,h.h)(this._config?.double_tap_action)}willUpdate(i){if(super.willUpdate(i),!this._config||!this.hass)return;const e=Boolean(!this.hass.user?.is_admin||this._config.hide_empty&&0===this._discoveredFlows.length);e!==this.hidden&&(this.style.display=e?"none":"",this.toggleAttribute("hidden",e),(0,c.r)(this,"card-visibility-changed",{value:!e}))}render(){if(!this._config||!this.hass||this.hidden)return s.s6;const i=this._discoveredFlows.length,e=this.hass.localize("ui.card.discovered-devices.title"),o=i>0?this.hass.localize("ui.card.discovered-devices.count_devices",{count:i}):this.hass.localize("ui.card.discovered-devices.no_devices");return s.qy` <ha-card> <ha-tile-container .vertical="${Boolean(this._config.vertical)}" .interactive="${this._hasCardAction}" .actionHandlerOptions="${{hasHold:(0,h.h)(this._config.hold_action),hasDoubleClick:(0,h.h)(this._config.double_tap_action)}}" @action="${this._handleAction}"> <ha-tile-icon slot="icon" .iconPath="${"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z"}"></ha-tile-icon> <ha-tile-info slot="info" .primary="${e}" .secondary="${o}"></ha-tile-info> </ha-tile-container> </ha-card> `}constructor(...i){super(...i),this.connectedWhileHidden=!0,this._discoveredFlows=[]}}g.styles=[_.c,s.AH`:host{--tile-color:var(--info-color)}`],(0,t.Cg)([(0,n.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,t.Cg)([(0,n.wk)()],g.prototype,"_config",void 0),(0,t.Cg)([(0,n.wk)()],g.prototype,"_discoveredFlows",void 0),g=(0,t.Cg)([(0,n.EM)("hui-discovered-devices-card")],g)}};
//# sourceMappingURL=64522.e110f39edf80b94a.js.map