import{jsxs as r,jsx as i}from"react/jsx-runtime";import{b as n,e as a}from"./table-BrXe3s2z.js";import{B as t}from"./badge-CFi7bqqA.js";import{B as c}from"./button-BvFBRYHq.js";import{P as d}from"./progress-DBZY2s3y.js";import{Gift as h,ToggleLeft as p,Pencil as g,Trash2 as f}from"lucide-react";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"@radix-ui/react-slot";import"class-variance-authority";import"react";import"@radix-ui/react-progress";function z({event:e,onEdit:l,onDelete:o,onToggle:m,formatNumber:s}){return r(n,{children:[i(a,{className:"font-medium",children:e.name}),i(a,{children:s(e.milestone)}),i(a,{children:r("div",{className:"w-32 space-y-1",children:[i(d,{value:Math.min(100,e.current_registrations/e.milestone*100),className:"h-2"}),r("p",{className:"text-xs text-muted-foreground",children:[s(e.current_registrations)," / ",s(e.milestone)]})]})}),i(a,{children:r("div",{className:"flex items-center gap-1",children:[i(h,{className:"w-4 h-4 text-primary"}),e.item_name," x",e.item_count]})}),i(a,{children:i(t,{variant:"outline",children:e.claims_count})}),i(a,{children:e.is_active?i(t,{className:"bg-green-500",children:"Active"}):i(t,{variant:"secondary",children:"Inactive"})}),i(a,{className:"text-right",children:r("div",{className:"flex items-center justify-end gap-2",children:[i(c,{variant:"ghost",size:"icon",onClick:()=>m(e),title:e.is_active?"Deactivate":"Activate",children:i(p,{className:"w-4 h-4"})}),i(c,{variant:"ghost",size:"icon",onClick:()=>l(e),children:i(g,{className:"w-4 h-4"})}),i(c,{variant:"ghost",size:"icon",onClick:()=>o(e),className:"text-destructive",children:i(f,{className:"w-4 h-4"})})]})})]},e.id)}export{z as EventTableRow};
