(()=>{var t={};t.id=2139,t.ids=[2139],t.modules={72934:t=>{"use strict";t.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:t=>{"use strict";t.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:t=>{"use strict";t.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},27790:t=>{"use strict";t.exports=require("assert")},78893:t=>{"use strict";t.exports=require("buffer")},84770:t=>{"use strict";t.exports=require("crypto")},17702:t=>{"use strict";t.exports=require("events")},32615:t=>{"use strict";t.exports=require("http")},35240:t=>{"use strict";t.exports=require("https")},55315:t=>{"use strict";t.exports=require("path")},86624:t=>{"use strict";t.exports=require("querystring")},17360:t=>{"use strict";t.exports=require("url")},21764:t=>{"use strict";t.exports=require("util")},71568:t=>{"use strict";t.exports=require("zlib")},33464:(t,e,i)=>{"use strict";i.r(e),i.d(e,{GlobalError:()=>o.a,__next_app__:()=>p,originalPathname:()=>c,pages:()=>l,routeModule:()=>m,tree:()=>u}),i(39211),i(49446),i(40656),i(40509),i(70546);var r=i(30170),s=i(45002),a=i(83876),o=i.n(a),n=i(66299),d={};for(let t in n)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(t)&&(d[t]=()=>n[t]);i.d(e,d);let u=["",{children:["admin",{children:["artists",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(i.bind(i,39211)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/artists/[id]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(i.bind(i,49446)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/layout.tsx"],metadata:{icon:[async t=>(await Promise.resolve().then(i.bind(i,57481))).default(t)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(i.bind(i,40656)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/layout.tsx"],error:[()=>Promise.resolve().then(i.bind(i,40509)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/error.tsx"],"not-found":[()=>Promise.resolve().then(i.bind(i,70546)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/not-found.tsx"],metadata:{icon:[async t=>(await Promise.resolve().then(i.bind(i,57481))).default(t)],apple:[],openGraph:[],twitter:[],manifest:void 0}}],l=["/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/artists/[id]/page.tsx"],c="/admin/artists/[id]/page",p={require:i,loadChunk:()=>Promise.resolve()},m=new r.AppPageRouteModule({definition:{kind:s.x.APP_PAGE,page:"/admin/artists/[id]/page",pathname:"/admin/artists/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:u}})},24350:(t,e,i)=>{Promise.resolve().then(i.bind(i,7796))},7796:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>u});var r=i(97247),s=i(28964),a=i(34178),o=i(72171),n=i(64890),d=i(10906);function u(){let t=(0,a.useParams)(),{toast:e}=(0,d.pm)(),[i,u]=(0,s.useState)(null),[l,c]=(0,s.useState)(!0),p=async()=>{try{let e=await fetch(`/api/artists/${t.id}`);if(!e.ok)throw Error("Failed to fetch artist");let i=await e.json();u(i.artist)}catch(t){console.error("Error fetching artist:",t),e({title:"Error",description:"Failed to load artist",variant:"destructive"})}finally{c(!1)}};return l?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"text-lg",children:"Loading artist..."})}):i?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[r.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Edit Artist"}),(0,r.jsxs)("p",{className:"text-muted-foreground",children:["Update ",i.name,"'s information and portfolio"]})]}),r.jsx(o.ArtistForm,{artist:i,onSuccess:()=>{e({title:"Success",description:"Artist updated successfully"}),p()}}),r.jsx(n.PortfolioManager,{artistId:i.id,onImagesUpdate:()=>{p()}})]}):r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"text-lg",children:"Artist not found"})})}},39211:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>r});let r=(0,i(45347).createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/artists/[id]/page.tsx#default`)}};var e=require("../../../../webpack-runtime.js");e.C(t);var i=t=>e(e.s=t),r=e.X(0,[9379,3670,1488,1511,4080,4128,6082,2092,6887,4882,921,4245,4106,5593,2171,4890],()=>i(33464));module.exports=r})();