1import{n as e,p as t,t as n}from"./BvCH4Qpg.js";import{B as r,H as i,L as a,Lt as o,Pt as s,Q as c,V as l,_ as u,d,f,g as p,l as m,r as h,u as g}from"./DUxaw1Dy.js";import{t as _}from"./BDNMzG2s.js";import{t as v}from"./Bqew0hM8.js";import{t as y}from"./BFrZb5O7.js";var b=t(y()),x={name:`PlaylistTable`,components:{icon:v},props:{columns:{type:Array,default:()=>[]},initIndex:{type:Number,default:0},canLoop:Boolean,clickableHeaders:Boolean},emits:[`tableChange`],data(){return{active:this.initIndex,direction:void 0,size:void 0}},computed:{hasNext(){return this.active+1<this.columns.length||this.canLoop},hasPrev(){return this.active>0||this.canLoop},headers(){return this.size===`sm`?[this.columns[this.active]]:this.columns}},watch:{size(e,t){(e===`sm`||t===`sm`||!t)&&this.reloadRows()}},created(){this.resized=(0,b.default)(()=>this.measure(),100)},mounted(){this.$nextTick(()=>{window.addEventListener(`resize`,this.resized)}),this.resized()},unmounted(){window.removeEventListener(`resize`,this.resized)},methods:{measure(){this.size=window.matchMedia(`(max-width:800px)`).matches?`sm`:window.matchMedia(`(max-width:1200px)`).matches?`md`:`lg`},next(){this.hasNext&&(this.active++,this.active%=this.columns.length,this.direction=`next`,this.reloadRows())},previous(){if(this.hasPrev){let e=this.columns.length;this.active+=e-1,this.active%=e,this.direction=`prev`,this.reloadRows()}},reloadRows(){this.$emit(`tableChange`,this.active,this.columns[this.active],this.size)},selectDay(e){this.size!==`sm`&&this.clickableHeaders&&e!==this.active&&(this.direction=e>this.active?`next`:`prev`,this.active=e,this.reloadRows())}}},S={class:`schedule-table`},C=[`onClick`],w={class:`table-header`},T={class:`heading-title`};function E(t,_,v,y,b,x){let E=i(`icon`);return a(),f(`table`,S,[m(`thead`,null,[m(`tr`,null,[_[0]||=m(`td`,{class:`blank-header`},null,-1),(a(!0),f(h,null,r(x.headers,(e,n)=>(a(),f(`th`,{key:n,class:s([{click:v.clickableHeaders&&b.size!==`sm`,active:v.clickableHeaders&&n===b.active&&b.size!==`sm`},`table-headers`]),onClick:e=>x.selectDay(n)},[m(`div`,w,[b.size===`sm`?(a(),g(E,{key:0,config:{icon:`left-arrow`,size:15,onclick:x.previous},class:s({invisible:!x.hasPrev})},null,8,[`config`,`class`])):d(``,!0),m(`p`,T,[l(t.$slots,`tableHeading`,{tableHeading:e,size:b.size},()=>[p(o(e),1)])]),b.size===`sm`?(a(),g(E,{key:1,config:{icon:`right-arrow`,size:15,onclick:x.next},class:s({invisible:!x.hasNext})},null,8,[`config`,`class`])):d(``,!0)])],10,C))),128))])]),u(n,{name:b.direction,mode:`out-in`},{default:c(()=>[(a(),g(e,{key:b.active,name:`list`,tag:`tbody`},{default:c(()=>[l(t.$slots,`rows`,{size:b.size})]),_:3}))]),_:3},8,[`name`])])}var D=Object.assign(_(x,[[`render`,E]]),{__name:`WidgetsPlaylistTable`});export{D as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.