1import{b as x,f as o,o as i,n as e,j as n,G as d,y as a,l as m,I as f,F as l,Q as g,H as h}from"./_plugin-vue_export-helper-2683964d.js";import{n as p,O as y}from"./app-43740c46.js";import{_ as u}from"./AppLayout-ef423d10.js";import"./ApplicationLogo-d1b3c4fa.js";const _={class:"py-12"},w={class:"max-w-7xl mx-auto sm:px-6 lg:px-8"},b={class:"bg-white overflow-hidden shadow-xl sm:rounded-lg"},v={class:"sm:flex sm:items-center p-4"},z={class:"mt-4 sm:mt-0 sm:ml-16 sm:flex-none"},k={class:"mt-8 flex flex-col"},N={class:"-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8"},B={class:"inline-block min-w-full py-2 align-middle md:px-6 lg:px-8"},I={class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg"},V={class:"min-w-full divide-y divide-gray-300"},C={class:"divide-y divide-gray-200 bg-white"},D={class:"whitespace-pre-line px-3 py-4 text-sm text-gray-500"},E=["src"],P={class:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6"},S={class:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6"},$={class:"whitespace-pre-line px-3 py-4 text-sm text-gray-500"},j={class:"whitespace-pre-line px-3 py-4 text-sm text-gray-500"},F={class:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 flex flex-col"},O=["onSubmit"],Q={__name:"Index",props:{prizes:Array},setup(c){return(r,t)=>(i(),x(u,{title:"Dashboard"},{header:o(()=>[...t[0]||(t[0]=[e("h2",{class:"font-semibold text-xl text-gray-800 leading-tight"}," Prizes ",-1)])]),default:o(()=>[e("div",_,[e("div",w,[e("div",b,[e("div",v,[t[2]||(t[2]=e("div",{class:"sm:flex-auto"},[e("h1",{class:"text-xl font-semibold text-gray-900"},"Prizes")],-1)),e("div",z,[n(a(p),{href:r.route("prizes.create"),class:"inline-flex items-center justify-center rounded-md border border-transparent bg-magic px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 sm:w-auto"},{default:o(()=>[...t[1]||(t[1]=[d("Create Prizes",-1)])]),_:1},8,["href"])])])]),e("div",k,[e("div",N,[e("div",B,[e("div",I,[e("table",V,[t[5]||(t[5]=e("thead",{class:"bg-gray-50"},[e("tr",null,[e("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"},"Img"),e("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"},"Name"),e("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"},"Chinese Name"),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},"Value"),e("th",{scope:"col",class:"px-1 py-3.5 text-left text-sm font-semibold text-gray-900"},"Winners"),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},"Image"),e("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-6"},[e("span",{class:"sr-only"},"Edit")])])],-1)),e("tbody",C,[(i(!0),m(h,null,f(c.prizes,s=>(i(),m("tr",{key:s.id},[e("td",D,[e("img",{src:s.s3Url,class:"w-20"},null,8,E)]),e("td",P,l(s.name),1),e("td",S,[e("p",null,l(s.c_name),1)]),e("td",$,"$"+l(s.value/100),1),e("td",j,l(s.winners),1),e("td",F,[n(a(p),{href:r.route("prizes.edit",s),class:"text-green-600 hover:text-green-900"},{default:o(()=>[...t[3]||(t[3]=[d("Edit",-1),e("span",{class:"sr-only"},null,-1)])]),_:1},8,["href"]),e("form",{onSubmit:g(A=>a(y).delete(r.route("prizes.destroy",s)),["prevent"])},[...t[4]||(t[4]=[e("button",{type:"submit",class:"text-green-600 hover:text-green-900"}," Delete ",-1)])],40,O)])]))),128))])])])])])])])])]),_:1}))}};export{Q as default};
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.