import{I as E}from"./IdnodeGrid-U6EqXqja.js";import{d as C,u as v,o as B,e as L,f as r,g as s,i as R,t as V,h as e,I as k,F as x,r as I,_ as S}from"./index-D92x6h1h.js";import{A as D}from"./ActionMenu-B3aKIJFu.js";import{B as M}from"./BooleanCell-BFiLlZVv.js";import{u as F}from"./useEditorMode-DvyB-mon.js";import{u as G}from"./useBulkAction-UV8yZtrd.js";import{b as N}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";const O={class:"rating-labels__empty"},P=C({__name:"RatingLabelsView",setup(z){const{t}=v(),d=[{field:"enabled",sortable:!0,filterType:"boolean",width:90,minVisible:"phone",phoneOrder:2,cellComponent:M,editable:!0},{field:"country",sortable:!0,filterType:"string",width:100,minVisible:"phone",phoneOrder:1,editable:!0},{field:"age",sortable:!0,filterType:"numeric",width:80,editable:!0},{field:"display_age",sortable:!0,filterType:"numeric",width:110,editable:!0},{field:"display_label",sortable:!0,filterType:"string",width:130,minVisible:"phone",phoneRole:"primary",editable:!0},{field:"label",sortable:!0,filterType:"string",width:130,editable:!0},{field:"authority",sortable:!0,filterType:"string",width:130,editable:!0},{field:"icon",sortable:!0,filterType:"string",width:200,editable:!0}],u=I(""),{editingUuid:a,editingUuids:c,creatingBase:p,creatingSubclass:b,gridRef:f,editorLevel:m,editorList:g,openEditor:o,openCreate:y,closeEditor:h,flipToEdit:_}=F({createBase:"ratinglabel",editList:u,urlSync:!0}),w=G({endpoint:"idnode/delete",confirmText:t("Do you really want to delete the selected rating labels?"),confirmSeverity:"danger",failPrefix:t("Failed to delete")});function T(n,i){return N({selection:n,clearSelection:i,remove:w,onAdd:()=>y(),onEdit:o,addTooltip:t("Add a new rating label")})}return(n,i)=>(B(),L(x,null,[r(E,{ref_key:"gridRef",ref:f,endpoint:"ratinglabel/grid","help-page":"class/ratinglabel","entity-class":"ratinglabel",columns:d,"store-key":"config-channel-rating-labels","default-sort":{key:"country",dir:"ASC"},"virtual-scroller-options":{itemSize:36,lazy:!1},"count-label":e(t)("rating labels"),"edit-mode":"cell",class:"rating-labels__grid",onRowDblclick:i[0]||(i[0]=l=>e(o)([l]))},{empty:s(()=>[R("p",O,V(e(t)("No rating labels defined. Map an OTA-EPG (country + age) or XMLTV (system + rating) pair to a display label and icon shown in EPG event details.")),1)]),toolbarActions:s(({selection:l,clearSelection:A})=>[r(D,{actions:T(l,A)},null,8,["actions"])]),_:1},8,["count-label"]),r(k,{uuid:e(a),uuids:e(c),"create-base":e(p),subclass:e(b),level:e(m),list:e(g),title:e(a)?e(t)("Edit Rating Label"):e(t)("Add Rating Label"),onClose:e(h),onCreated:e(_)},null,8,["uuid","uuids","create-base","subclass","level","list","title","onClose","onCreated"])],64))}}),re=S(P,[["__scopeId","data-v-8e47e088"]]);export{re as default};
