(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55764,e=>{"use strict";var r=e.i(43476),a=e.i(71645),t=e.i(75157);let i=(0,a.forwardRef)(({className:e,...a},i)=>(0,r.jsx)("input",{ref:i,className:(0,t.cn)("h-11 w-full min-w-0 rounded-md border border-[var(--border)] bg-white px-3 text-sm text-[var(--ink)] outline-none placeholder:text-[var(--ink-faint)] focus:border-[var(--primary)] focus:ring-2 focus:ring-[var(--focus)]",e),...a}));i.displayName="Input",e.s(["Input",0,i])},10204,e=>{"use strict";var r=e.i(43476),a=e.i(75157);e.s(["Label",0,function({className:e,...t}){return(0,r.jsx)("label",{className:(0,a.cn)("mb-1.5 block text-sm font-semibold text-[var(--ink)]",e),...t})}])},20475,e=>{"use strict";var r=e.i(43476),a=e.i(71645);let t=(0,e.i(75254).default)("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var i=e.i(55764),s=e.i(10204);e.s(["ImageUploadField",0,function({id:e,name:l,label:n,required:d=!1}){let[c,o]=(0,a.useState)(null),u=e??l;return(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)(s.Label,{htmlFor:u,children:n}),(0,r.jsxs)("div",{className:"grid min-w-0 gap-3 rounded-md border border-[var(--border)] bg-[var(--surface-muted)] p-3",children:[(0,r.jsx)("div",{className:"grid aspect-[16/9] place-items-center overflow-hidden rounded-md border border-dashed bg-white",children:c?(0,r.jsx)("img",{src:c,alt:`معاينة ${n}`,className:"h-full w-full object-contain"}):(0,r.jsxs)("div",{className:"grid justify-items-center gap-2 text-xs font-semibold text-[var(--ink-faint)]",children:[(0,r.jsx)(t,{size:24,"aria-hidden":!0}),"معاينة الصورة"]})}),(0,r.jsx)(i.Input,{id:u,name:l,type:"file",accept:".jpg,.jpeg,.png,.webp,image/jpeg,image/png,image/webp",required:d,className:"min-w-0 bg-white",onChange:e=>{let r=e.currentTarget.files?.[0];if(!r)return void o(null);let a=new FileReader;a.onload=()=>o("string"==typeof a.result?a.result:null),a.readAsDataURL(r)}})]})]})}],20475)}]);