import{I as C}from"./IdnodeGrid-U6EqXqja.js";import{d as T,u as k,o as v,e as G,f as a,g as d,i as P,t as A,h as t,I as B,F as D,r as I,_ as S}from"./index-D92x6h1h.js";import{A as x}from"./ActionMenu-B3aKIJFu.js";import{B as s}from"./BooleanCell-BFiLlZVv.js";import{E as u}from"./EnumNameCell-BjJ4chu_.js";import{u as N}from"./useEditorMode-DvyB-mon.js";import{u as V}from"./useBulkAction-UV8yZtrd.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";const R={class:"epg-grabber-channels__empty"},F=T({__name:"EpgGrabberChannelsView",setup(O){const{t:e}=k(),p=[{key:"update_icon",val:e("Icon")},{key:"update_chnum",val:e("Number")},{key:"update_chname",val:e("Name")}],c=[{field:"enabled",sortable:!0,filterType:"boolean",width:90,minVisible:"phone",phoneOrder:2,cellComponent:s,editable:!0},{field:"modid",sortable:!0,filterType:"string",width:200,hiddenByDefault:!0,editable:!0},{field:"module",sortable:!0,filterType:"string",width:140,minVisible:"phone",phoneOrder:1,editable:!0},{field:"path",sortable:!0,filterType:"string",width:280,editable:!0},{field:"updated",sortable:!0,filterType:"numeric",width:150,editable:!0},{field:"id",sortable:!0,filterType:"string",width:200,editable:!0},{field:"name",sortable:!0,filterType:"string",width:220,minVisible:"phone",phoneRole:"primary",editable:!0},{field:"names",sortable:!0,filterType:"string",width:200,editable:!0},{field:"number",sortable:!0,filterType:"numeric",width:110,editable:!0},{field:"icon",sortable:!0,filterType:"string",width:280,editable:!0},{field:"channels",sortable:!0,filterType:"string",width:220,cellComponent:u,enumSource:{type:"api",uri:"channel/list",params:{all:1}},editable:!0,targetUuidField:"channels",targetAccessKey:"admin",pickerTitle:e("Channels")},{field:"only_one",sortable:!0,filterType:"boolean",width:110,cellComponent:s,editable:!0},{field:"update",sortable:!0,filterType:"string",width:200,cellComponent:u,enumSource:p,editable:!0},{field:"comment",sortable:!0,filterType:"string",width:200,editable:!0}],b=I(""),{editingUuid:m,editingUuids:f,gridRef:h,editorLevel:g,editorList:y,openEditor:o,closeEditor:_}=N({createBase:"",editList:b,urlSync:!0}),r=V({endpoint:"idnode/delete",confirmText:e("Do you really want to delete the selected EPG grabber channels?"),confirmSeverity:"danger",failPrefix:e("Failed to delete")});function E(i,l){return[{id:"edit",label:e("Edit"),tooltip:e("Edit the selected EPG grabber channel"),disabled:i.length!==1,onClick:()=>o(i)},{id:"delete",label:r.inflight.value?e("Deleting…"):e("Delete"),tooltip:e("Delete the selected EPG grabber channels"),disabled:i.length===0||r.inflight.value,onClick:()=>r.run(i,l)}]}return(i,l)=>(v(),G(D,null,[a(C,{ref_key:"gridRef",ref:h,endpoint:"epggrab/channel/grid","help-page":"class/epggrab_channel","entity-class":"epggrab_channel",columns:c,"store-key":"config-channel-epg-grabber-channels","default-sort":{key:"name",dir:"ASC"},"lock-level":"expert","virtual-scroller-options":{itemSize:36,lazy:!1},"count-label":t(e)("channels"),"edit-mode":"cell",class:"epg-grabber-channels__grid",onRowDblclick:l[0]||(l[0]=n=>t(o)([n]))},{empty:d(()=>[P("p",R,A(t(e)("No EPG grabber channels yet. Run an EPG grabber scan from Configuration → Channel / EPG → EPG Grabber to populate them.")),1)]),toolbarActions:d(({selection:n,clearSelection:w})=>[a(x,{actions:E(n,w)},null,8,["actions"])]),_:1},8,["count-label"]),a(B,{uuid:t(m),uuids:t(f),level:t(g),list:t(y),title:t(e)("Edit EPG Grabber Channel"),onClose:t(_)},null,8,["uuid","uuids","level","list","title","onClose"])],64))}}),te=S(F,[["__scopeId","data-v-cf325f41"]]);export{te as default};
