import{aT as f,aU as g,j as e}from"./react-vendor-xYZnmIII.js";import{I as j}from"./input-error-_LAmvivg.js";import{L as a}from"./loading-button-D7aXR3K4.js";import{I as v}from"./ui-components-CQM92IK3.js";import{o as y}from"./inertia-FIn3q7f1.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const L=({outcome:t})=>{const{props:n}=f(),{translate:m}=n,{input:u,button:s}=m,{data:i,setData:c,put:l,delete:d,errors:p,processing:r}=g({outcome:t?t.outcome:""}),x=o=>{o.preventDefault(),l(route("outcomes.update",{outcome:t.id}))},h=()=>{d(route("outcomes.destroy",{outcome:t.id}))};return e.jsxs("form",{onSubmit:x,className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx(v,{required:!0,type:"text",name:"outcome",value:i.outcome||"",placeholder:u.outcome,onChange:o=>y(o,c)}),e.jsx(j,{message:p.outcome})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(a,{type:"button",variant:"outline",loading:r,onClick:h,className:"h-7 w-full bg-red-50 text-xs hover:bg-red-100",children:s.remove}),e.jsx(a,{variant:"secondary",className:"h-7 w-full text-xs",loading:r,children:s.save})]})]})};export{L as default};
