(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2323,e=>{"use strict";e.s(["adminInputCls",0,"w-full rounded-lg border border-[#d9e2f7] bg-white px-3.5 py-2.5 text-sm text-[#132b87] placeholder:text-[#a5b0cc] focus:outline-none focus:border-[#1f3fb8] focus:ring-2 focus:ring-[#1f3fb8]/15 transition","adminLabelCls",0,"block text-xs font-medium text-[#5a688d] mb-1.5"])},40127,e=>{"use strict";var r=e.i(43476),s=e.i(2323);function t({message:e}){return e?(0,r.jsx)("p",{className:"mt-1 text-xs text-red-600",role:"alert",children:e}):null}e.s(["AdminField",0,function({label:e,name:i,children:l,error:d}){return(0,r.jsxs)("label",{className:"block",htmlFor:i,children:[(0,r.jsx)("span",{className:s.adminLabelCls,children:e}),l,(0,r.jsx)(t,{message:d})]})},"FieldError",0,t])},89161,e=>{"use strict";var r=e.i(43476),s=e.i(71645),t=e.i(40127),i=e.i(2323);e.s(["default",0,function({action:e,initial:l,submitLabel:d}){let[a,n,o]=(0,s.useActionState)(e,void 0);return(0,r.jsxs)("form",{action:n,className:"rounded-2xl border border-[#d9e2f7] bg-white p-5 sm:p-6 space-y-5 max-w-2xl",children:[(0,r.jsx)(t.AdminField,{label:"Title",name:"title",error:a?.errors?.title?.[0],children:(0,r.jsx)("input",{id:"title",name:"title",required:!0,defaultValue:l?.title??"",className:i.adminInputCls})}),(0,r.jsx)(t.AdminField,{label:"Description",name:"description",error:a?.errors?.description?.[0],children:(0,r.jsx)("textarea",{id:"description",name:"description",required:!0,rows:5,defaultValue:l?.description??"",className:`${i.adminInputCls} resize-y`})}),(0,r.jsx)(t.AdminField,{label:"Sort order",name:"sortOrder",error:a?.errors?.sortOrder?.[0],children:(0,r.jsx)("input",{id:"sortOrder",name:"sortOrder",type:"number",min:0,defaultValue:l?.sortOrder??0,className:i.adminInputCls})}),(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("input",{type:"checkbox",name:"published",defaultChecked:l?.published??!0,className:"accent-[#1f3fb8]"}),"Published on website"]}),(0,r.jsx)(t.FieldError,{message:a?.errors?.published?.[0]}),a?.message&&(0,r.jsx)("p",{className:"text-sm text-red-600",role:"alert",children:a.message}),(0,r.jsx)("button",{type:"submit",disabled:o,className:"rounded-full bg-[#1f3fb8] px-6 py-2.5 text-sm font-semibold text-white hover:bg-[#18339a] disabled:opacity-60",children:o?"Saving...":d})]})}])}]);