import{b as x,j as e}from"./vendor-rThclpOQ.js";import{I as c}from"./input-error-Br4ngfdE.js";import{L as s}from"./loading-button-DKhpmf6V.js";import{T as p}from"./textarea-DM_GyfeP.js";import{o as h}from"./inertia-SZXqLvQm.js";import"./utils-8KAaAB9H.js";import"./button-ZcsoqUQn.js";import"./index-DquVdLUg.js";const C=({requirement:r})=>{const{data:n,setData:o,put:m,delete:i,errors:u,processing:a}=x({requirement:r?r.requirement:""}),l=t=>{t.preventDefault(),m(route("exam-requirements.update",{exam_requirement:r.id}))},d=()=>{i(route("exam-requirements.destroy",{exam_requirement:r.id}))};return e.jsxs("form",{onSubmit:l,className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx(p,{required:!0,name:"requirement",value:n.requirement||"",placeholder:"Enter exam requirement",onChange:t=>h(t,o)}),e.jsx(c,{message:u.requirement})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(s,{type:"button",variant:"outline",loading:a,onClick:d,className:"h-7 w-full bg-red-50 text-xs hover:bg-red-100",children:"Remove"}),e.jsx(s,{variant:"secondary",className:"h-7 w-full text-xs",loading:a,children:"Save"})]})]})};export{C as default};
