import{An as e,C as t,E as n,L as r,Nn as i,P as a,Qt as o,_n as s,an as c,bn as l,bt as u,en as d,nn as f,on as p,q as m,rn as h,tn as g,vn as _,wn as v}from"./app-4kCgdoJR.js";import{t as y}from"./AdminLayout-DEe0k-dp.js";var b={class:`flex items-center justify-center gap-4`},x={class:`-m-2 flex items-center rounded-md p-2.5 transition duration-150 ease-in-out`},S={class:`sr-only`},C={class:`px-4 py-2`},w={class:`relative flex grow flex-col items-stretch justify-stretch self-stretch bg-white px-4 sm:px-6 lg:px-8 dark:bg-gray-800`},T={class:`flow-root grow`},E={class:`-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8`},D={class:`my-2 inline-block min-w-full border-b border-gray-200 align-middle dark:border-gray-700`},O={class:`min-w-full divide-y divide-gray-200 dark:divide-gray-700`},k={scope:`col`,class:`text-focus w-16 py-3.5 ps-4 pe-3 text-start text-sm font-semibold whitespace-nowrap sm:ps-6 lg:ps-8`},A={scope:`col`,class:`text-focus px-3 py-3.5 text-start text-sm font-semibold`},j={scope:`col`,class:`text-focus w-24 px-3 py-3.5 text-start text-sm font-semibold`},M={key:0,scope:`col`,class:`text-focus px-3 py-3.5 text-start text-sm font-semibold`},N={class:`divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-900`},P={class:`text-focus w-14 py-4 ps-4 pe-3 text-sm whitespace-nowrap sm:ps-6 lg:ps-8`},F={class:`px-3 py-4 text-sm font-semibold`},I=[`innerHTML`],L={class:`w-24 py-4 ps-3 pe-6 text-end text-sm whitespace-nowrap`},R={key:0,class:`px-3 py-4 text-sm whitespace-nowrap`},z={key:1},B={colspan:`100%`},V={class:`text-mute py-3.5 ps-4 pe-3 text-sm font-light whitespace-nowrap sm:ps-2 lg:ps-4`},H={class:`-mx-4 sm:-mx-6 lg:-mx-8`},U=Object.assign({layout:y},{__name:`Track`,props:[`pagination`,`product`],setup(y){let{filters:U,searching:W,searchNow:G}=m();return(m,K)=>{let q=l(`Head`),J=l(`Icon`),Y=l(`Header`);return s(),h(o,null,[p(q,null,{default:v(()=>[d(`title`,null,i(m.$t(`Product Tracks`)),1)]),_:1}),p(Y,null,{subheading:v(()=>[c(i(m.$t(`Please review the data below`)),1)]),menu:v(()=>[d(`div`,b,[p(e(a),{href:m.route(`products.index`)},{default:v(()=>[c(i(m.$t(`List {x}`,{x:m.$t(`Products`)})),1)]),_:1},8,[`href`]),p(e(u),{align:`right`,width:`56`,"auto-close":!1},{trigger:v(()=>[d(`button`,x,[p(J,{name:`funnel-o`,size:`size-5`}),d(`span`,S,i(m.$t(`Show Filters`)),1)])]),content:v(()=>[d(`div`,C,[d(`div`,null,[p(e(r),{json:!0,onChange:e(G),label:m.$t(`Trashed`),modelValue:e(U).trashed,"onUpdate:modelValue":K[0]||=t=>e(U).trashed=t,placeholder:m.$t(`With Trashed`),suggestions:[{value:`not`,label:m.$t(`Not Trashed`)},{value:`with`,label:m.$t(`With Trashed`)},{value:`only`,label:m.$t(`Only Trashed`)}]},null,8,[`onChange`,`label`,`modelValue`,`placeholder`,`suggestions`])])])]),_:1})])]),default:v(()=>[c(i(m.$t(`Product Tracks`))+` (`+i(y.product.name)+`) `,1)]),_:1}),d(`div`,w,[e(W)?(s(),g(e(n),{key:0,"circle-size":`w-10 h-10`})):f(``,!0),d(`div`,T,[d(`div`,E,[d(`div`,D,[d(`table`,O,[d(`thead`,null,[d(`tr`,null,[d(`th`,k,i(m.$t(`Created at`)),1),d(`th`,A,i(m.$t(`Description`)),1),d(`th`,j,i(m.$t(`Quantity`)),1),m.$page.props.selected_store?f(``,!0):(s(),h(`th`,M,i(m.$t(`Store`)),1))])]),d(`tbody`,N,[y.pagination&&y.pagination.data&&y.pagination.data.length?(s(!0),h(o,{key:0},_(y.pagination.data,e=>(s(),h(`tr`,{key:e.id},[d(`td`,P,i(m.$datetime(e.created_at)),1),d(`td`,F,[d(`div`,{innerHTML:e.description,class:`line-clamp-3`},null,8,I)]),d(`td`,L,i(m.$number_qty(e.value)),1),m.$page.props.selected_store?f(``,!0):(s(),h(`td`,R,i(e.store?.name||``),1))]))),128)):(s(),h(`tr`,z,[d(`td`,B,[d(`div`,V,i(m.$t(`There is no data to display!`)),1)])]))])])])])]),d(`div`,H,[p(e(t),{class:`mx-4 mt-auto py-2 text-sm sm:mx-6`,meta:y.pagination.meta,links:y.pagination.links},null,8,[`meta`,`links`])])])],64)}}});export{U as default};