export const __rspack_esm_id="94666";export const __rspack_esm_ids=["94666"];export const __webpack_modules__={68348(t,s,e){e.d(s,{u:()=>a});e(18111),e(13579);const a=t=>{if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const s=t[0];if("TEXTAREA"===s.tagName)return!1;if("HA-SELECT"===s.parentElement?.tagName)return!1;if("INPUT"!==s.tagName)return!0;switch(s.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},27661(t,s,e){var a=e(62826),o=e(51978),i=e(94743),d=e(44457),r=e(96196),n=e(63091);class l extends o.n{firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}}l.styles=[i.R,r.AH`:host{--mdc-typography-button-text-transform:none;--mdc-typography-button-font-size:var(--ha-font-size-l);--mdc-typography-button-font-family:var(--ha-font-family-body);--mdc-typography-button-font-weight:var(--ha-font-weight-medium)}:host .mdc-fab--extended{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab--extended .mdc-fab__icon{margin-inline-start:-8px;margin-inline-end:12px;direction:var(--direction)}:disabled{--mdc-theme-secondary:var(--disabled-text-color);pointer-events:none}`,"rtl"===n.G.document.dir?r.AH`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`:r.AH``],l=(0,a.Cg)([(0,d.EM)("ha-fab")],l)},91250(t,s,e){e.r(s),e.d(s,{SSDPConfigPanel:()=>_});e(18111),e(20116),e(61701);var a=e(62826),o=e(96196),i=e(44457),d=e(22786),r=(e(27661),e(26300),e(72553),e(14503)),n=e(54706),l=e(93905),c=(e(44114),e(35518));const p=(t,s)=>t.subscribeMessage(t=>{const e=[...s.state||[]];if(t.add)for(const s of t.add){const t=e.findIndex(t=>t.ssdp_st===s.ssdp_st&&t.ssdp_location===s.ssdp_location);-1===t?e.push(s):e[t]=s}if(t.change)for(const s of t.change){const t=e.findIndex(t=>t.ssdp_st===s.ssdp_st&&t.ssdp_location===s.ssdp_location);-1!==t&&(e[t]=s)}if(t.remove)for(const s of t.remove){const t=e.findIndex(t=>t.ssdp_st===s.ssdp_st&&t.ssdp_location===s.ssdp_location);-1!==t&&e.splice(t,1)}s.setState(e,!0)},{type:"ssdp/subscribe_discovery"});var h=e(1087);const u=()=>e.e("39670").then(e.bind(e,58485));class _ extends((0,n.E)(o.WF)){hassSubscribe(){return[(t=this.hass.connection,s=t=>{this._data=t},(0,c.N)("_ssdpDiscoveryRows",()=>Promise.resolve([]),p,t,s))];var t,s}render(){return o.qy` <hass-tabs-subpage-data-table .hass="${this.hass}" .narrow="${this.narrow}" .route="${this.route}" .columns="${this._columns(this.hass.localize)}" .initialGroupColumn="${this._activeGrouping}" .initialCollapsedGroups="${this._activeCollapsed}" @grouping-changed="${this._handleGroupingChanged}" @collapsed-changed="${this._handleCollapseChanged}" .data="${this._dataWithIds(this._data)}" .noDataText="${this.hass.localize("ui.panel.config.ssdp.no_devices_found")}" @row-click="${this._handleRowClicked}" clickable></hass-tabs-subpage-data-table> `}_handleRowClicked(t){const s=this._data.find(s=>[s.ssdp_st,s.ssdp_location].filter(Boolean).join("|")===t.detail.id);var e,a;e=this,a={entry:s},(0,h.r)(e,"show-dialog",{dialogTag:"dialog-ssdp-device-info",dialogImport:u,dialogParams:a})}_handleGroupingChanged(t){this._activeGrouping=t.detail.value}_handleCollapseChanged(t){this._activeCollapsed=t.detail.value}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._data=[],this._activeGrouping="ssdp_location",this._activeCollapsed=[],this._columns=(0,d.A)(t=>({name:{title:t("ui.panel.config.ssdp.name"),sortable:!0,filterable:!0,showNarrow:!0,main:!0,hideable:!1,moveable:!1},ssdp_st:{title:t("ui.panel.config.ssdp.ssdp_st"),sortable:!0,filterable:!0,showNarrow:!0,hideable:!1,direction:"asc"},ssdp_location:{title:t("ui.panel.config.ssdp.ssdp_location"),filterable:!0,sortable:!0,groupable:!0}})),this._dataWithIds=(0,d.A)(t=>t.map(t=>({...t,id:[t.ssdp_st,t.ssdp_location].filter(Boolean).join("|")})))}}_.styles=r.RF,(0,a.Cg)([(0,i.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],_.prototype,"route",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean})],_.prototype,"narrow",void 0),(0,a.Cg)([(0,i.MZ)({attribute:"is-wide",type:Boolean})],_.prototype,"isWide",void 0),(0,a.Cg)([(0,i.wk)()],_.prototype,"_data",void 0),(0,a.Cg)([(0,l.I)({key:"ssdp-discovery-table-grouping",state:!1,subscribe:!1})],_.prototype,"_activeGrouping",void 0),(0,a.Cg)([(0,l.I)({key:"ssdp-discovery-table-collapsed",state:!1,subscribe:!1})],_.prototype,"_activeCollapsed",void 0),_=(0,a.Cg)([(0,i.EM)("ssdp-config-panel")],_)}};
//# sourceMappingURL=94666.bd7c0526cfcecde8.js.map