"use strict";exports.id=93215,exports.ids=[93215],exports.modules={93215:(a,b,c)=>{c.r(b),c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(19099),g=c(54130),h=c(91817),i=c(91115),j=c(41090);function k({params:a}){let b=(0,f.useRouter)(),c=(0,e.use)(a),k=c?.id,[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(!0),p=async a=>{try{if(!k)throw Error("Testimonial ID is required");await h.fI(k,a),(0,i.Te)("Testimonial updated successfully!"),b.push("/admin/testimonials")}catch(a){throw console.error("Error updating testimonial:",a),(0,i.Qg)(Object(a).message||"Failed to update testimonial"),a}};return n?(0,d.jsx)("div",{className:"flex items-center justify-center min-h-[400px]",children:(0,d.jsx)("div",{className:"text-center",children:(0,d.jsx)("div",{className:"text-lg text-[var(--muted-foreground)]",children:"Loading testimonial..."})})}):l?(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:"Edit Testimonial"}),(0,d.jsx)("p",{className:"text-[var(--muted-foreground)] mt-2",children:"Update testimonial details"})]}),(0,d.jsx)(g.S,{testimonial:l,onSubmit:p,onCancel:()=>{b.push("/admin/testimonials")}})]}):(0,d.jsx)(j.Z,{padding:"lg",children:(0,d.jsx)("div",{className:"text-center py-8",children:(0,d.jsx)("p",{className:"text-[var(--muted-foreground)]",children:"Testimonial not found"})})})}}};