1import{j as e}from"./vendor-wHC2ntYA.js";import{b as m}from"./inertia-BxUlTYdw.js";import{A as d,b as p,c as h,d as u,e as x,f as g,g as j,h as f}from"./alert-dialog-BqPmJ-Ez.js";import{a as b}from"./formatDateTime-COUDNvVQ.js";import"./index-9z1s8jpi.js";import"./index-D1Fr3kbQ.js";import"./index-Cnj_YRLL.js";import"./index-CnCZDGbR.js";import"./index-DGQvBiqS.js";import"./index-BYz_zuFP.js";import"./app-CJjB2_mY.js";/* empty css */import"./button-DgxPEQwo.js";import"./index-C3nnnCt4.js";function R({submission:s,isOpen:o,isDeleting:r,onCancel:a,onConfirm:i}){const{auth:t}=m().props;if(!s)return null;const l=b(s.submittedAtIso,t.user.time_format,t.user.timezone),n=c=>{!c&&!r&&a()};return e.jsx(d,{open:o,onOpenChange:n,children:e.jsxs(p,{className:"rounded-card",children:[e.jsxs(h,{children:[e.jsx(u,{children:"Delete Rating Submission?"}),e.jsx(x,{asChild:!0,children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["Are you sure you want to delete the submission from"," ",e.jsx("strong",{children:l}),"?"]}),e.jsxs("p",{children:["This will remove all ",s.playerCount," ratings from this submission and ",e.jsx("strong",{children:"recalculate player averages"}),"."]}),e.jsx("p",{className:"text-amber-600 font-medium",children:"This action cannot be undone."})]})})]}),e.jsxs(g,{children:[e.jsx(j,{disabled:r,className:"rounded-button",children:"Cancel"}),e.jsx(f,{onClick:i,disabled:r,className:"rounded-button bg-red-600 hover:bg-red-700 focus:ring-red-600",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"w-4 h-4 mr-2 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Deleting..."]}):"Delete Submission"})]})]})})}export{R 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.