"use strict";exports.id=71582,exports.ids=[11289,33670,71582],exports.modules={23273:(a,b,c)=>{c.r(b),c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c.n(e),g=c(41090),h=c(19099),i=c(54130),j=c(91817),k=c(91115);function l(){let a=(0,h.useRouter)(),[b,c]=f().useState([]),[e,l]=f().useState(!0),m=async b=>{try{await j.GW(b),(0,k.Te)("Testimonial created successfully!"),a.push("/admin/testimonials")}catch(a){throw console.error("Error creating testimonial:",a),(0,k.Qg)(Object(a).message||"Failed to create testimonial"),a}};return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"mb-8",children:[(0,d.jsx)("h1",{className:"text-3xl font-bold text-[var(--foreground)]",children:"Create New Testimonial"}),(0,d.jsx)("p",{className:"text-[var(--muted-foreground)] mt-2",children:"Add a new student testimonial or review"})]}),(0,d.jsx)(i.S,{onSubmit:m,onCancel:()=>{a.push("/admin/testimonials")},showProfileImageField:!1,showDisplayOrderField:!1}),(0,d.jsxs)(g.Z,{padding:"lg",className:"mt-6",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold text-[var(--foreground)]",children:"All Testimonials (Text Only)"}),(0,d.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mt-1",children:"Quick view of existing testimonial text to avoid duplicates."}),(0,d.jsx)("div",{className:"mt-4 space-y-3 max-h-[420px] overflow-y-auto pr-2",children:e?(0,d.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading testimonials..."}):b.length>0?b.map(a=>(0,d.jsx)("div",{className:"rounded-md border border-[var(--border)] p-3",children:(0,d.jsx)("p",{className:"text-sm text-[var(--foreground)] line-clamp-3",children:a.comment})},a.id)):(0,d.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No testimonials found."})})]})]})}},33670:(a,b,c)=>{c.d(b,{T:()=>g});var d=c(48249),e=c(67484),f=c(14113);let g=({label:a,error:b,helperText:c,className:g,id:h,variant:i="default",...j})=>{let k=(0,e.useId)(),l=h||k,m="marketing"===i;return(0,d.jsxs)("div",{className:"w-full",children:[a&&(0,d.jsx)("label",{htmlFor:l,className:m?"mb-1.5 block text-sm font-medium text-slate-800":"mb-1 block text-sm font-medium text-[var(--foreground)]",children:a}),(0,d.jsx)("textarea",{id:l,className:(0,f.xW)("w-full resize-y transition-colors focus:outline-none",m?"rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-900 shadow-none placeholder:text-slate-400 focus:border-secondary-800 focus:ring-2 focus:ring-secondary-900/15":"rounded-none border px-4 py-2 focus:ring-2 focus:ring-[var(--primary-500)] focus:border-transparent",!m&&(b?"border-[var(--error)] focus:ring-red-500":"border-[var(--border)]"),m&&b?"border-red-400 focus:border-red-500 focus:ring-red-500/20":"",m?"":"bg-[var(--input)] text-[var(--foreground)]",g),...j}),b&&(0,d.jsx)("p",{className:"mt-1 text-sm text-[var(--error)]",children:b}),c&&!b&&(0,d.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:c})]})}}};