import{I as D}from"./IdnodeGrid-U6EqXqja.js";import{M as E,d as M,u as N,o as S,e as z,f as n,g as c,i as P,t as R,h as e,I as F,F as q,r as p,_ as L}from"./index-D92x6h1h.js";import{I as H}from"./IdnodePickClassDialog-CA1mKQhx.js";import{A as O}from"./ActionMenu-B3aKIJFu.js";import{B as s}from"./BooleanCell-BFiLlZVv.js";import{u as U}from"./useEditorMode-DvyB-mon.js";import{u as m}from"./useBulkAction-UV8yZtrd.js";import{b as j}from"./dvrToolbarHelpers-C5M0Cokf.js";import"./DataGrid-CbtTsx8d.js";import"./index-BG9mM10J.js";import"./index-7HNOjfAo.js";import"./localDay-CoEbUe3O.js";import"./SearchInput-DBHWpJgW.js";import"./useGridLayout-DCIiMD42.js";import"./CollapsibleSection.vue_vue_type_style_index_0_lang-Cq2AVc9p.js";import"./sliders-horizontal-Am8f4Xsv.js";import"./useStaleDataRecovery-BuNK-94T.js";/**
 * @license lucide-vue-next v0.460.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G=E("RadarIcon",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]),$={class:"dvb-networks__empty"},J=M({__name:"DvbNetworksView",setup(K){const{t}=N(),f=[{field:"enabled",sortable:!0,filterType:"boolean",width:100,minVisible:"phone",phoneOrder:1,cellComponent:s,editable:!0},{field:"networkname",sortable:!0,filterType:"string",width:250,minVisible:"phone",phoneRole:"primary",editable:!0},{field:"num_mux",sortable:!0,filterType:"numeric",width:100,minVisible:"phone",phoneOrder:2,editable:!0},{field:"num_svc",sortable:!0,filterType:"numeric",width:100,editable:!0},{field:"num_chn",sortable:!0,filterType:"numeric",width:100,editable:!0},{field:"scanq_length",sortable:!0,filterType:"numeric",width:110,editable:!0},{field:"autodiscovery",sortable:!0,width:130,editable:!0},{field:"bouquet",sortable:!0,filterType:"boolean",width:100,cellComponent:s,editable:!0},{field:"skipinitscan",sortable:!0,filterType:"boolean",width:130,cellComponent:s,editable:!0},{field:"idlescan",sortable:!0,filterType:"boolean",width:110,cellComponent:s,editable:!0},{field:"charset",sortable:!0,filterType:"string",width:130,editable:!0}],b=p(""),{editingUuid:d,editingUuids:k,creatingBase:w,creatingSubclass:h,gridRef:y,editorLevel:g,editorList:v,openEditor:u,openCreate:_,closeEditor:A,flipToEdit:C}=U({createBase:"mpegts/network",editList:b,urlSync:!0}),T=m({endpoint:"idnode/delete",confirmText:t("Do you really want to delete the selected networks?"),confirmSeverity:"danger",failPrefix:t("Failed to delete")}),a=m({endpoint:"mpegts/network/scan",failPrefix:t("Failed to start scan")}),r=p(!1);function I(){r.value=!0}function V(i){r.value=!1,_(i)}function x(i,o){return[...j({selection:i,clearSelection:o,remove:T,onAdd:I,onEdit:u,addTooltip:t("Add a new network")}),{id:"scan",label:a.inflight.value?t("Scanning…"):t("Force Scan"),tooltip:t("Trigger a scan pass on the selected networks"),icon:G,disabled:i.length===0||a.inflight.value,onClick:()=>a.run(i,o)}]}return(i,o)=>(S(),z(q,null,[n(D,{ref_key:"gridRef",ref:y,endpoint:"mpegts/network/grid","help-page":"class/mpegts_network","entity-class":"mpegts_network","notification-class":"mpegts_network",columns:f,"store-key":"config-dvb-networks","default-sort":{key:"networkname",dir:"ASC"},"virtual-scroller-options":{itemSize:36,lazy:!1},"count-label":e(t)("networks"),"edit-mode":"cell",class:"dvb-networks__grid",onRowDblclick:o[0]||(o[0]=l=>e(u)([l]))},{empty:c(()=>[P("p",$,R(e(t)("No networks defined. Add one for each DVB-T / C / S adapter, or for an IPTV / SAT>IP / HDHomeRun input.")),1)]),toolbarActions:c(({selection:l,clearSelection:B})=>[n(O,{actions:x(l,B)},null,8,["actions"])]),_:1},8,["count-label"]),n(H,{visible:r.value,"builders-endpoint":"mpegts/network/builders",title:e(t)("Add Network"),label:e(t)("Network type"),onPick:V,onClose:o[1]||(o[1]=l=>r.value=!1)},null,8,["visible","title","label"]),n(F,{uuid:e(d),uuids:e(k),"create-base":e(w),subclass:e(h),level:e(g),list:e(v),title:e(d)?e(t)("Edit Network"):e(t)("Add Network"),onClose:e(A),onCreated:e(C)},null,8,["uuid","uuids","create-base","subclass","level","list","title","onClose","onCreated"])],64))}}),pe=L(J,[["__scopeId","data-v-1b897269"]]);export{pe as default};
