1 line
32 KiB
JavaScript

(()=>{var e={};e.id=6140,e.ids=[6140],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},27790:e=>{"use strict";e.exports=require("assert")},78893:e=>{"use strict";e.exports=require("buffer")},84770:e=>{"use strict";e.exports=require("crypto")},17702:e=>{"use strict";e.exports=require("events")},32615:e=>{"use strict";e.exports=require("http")},35240:e=>{"use strict";e.exports=require("https")},55315:e=>{"use strict";e.exports=require("path")},86624:e=>{"use strict";e.exports=require("querystring")},17360:e=>{"use strict";e.exports=require("url")},21764:e=>{"use strict";e.exports=require("util")},71568:e=>{"use strict";e.exports=require("zlib")},3730:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>i.a,__next_app__:()=>h,originalPathname:()=>u,pages:()=>c,routeModule:()=>p,tree:()=>d}),s(9092),s(49446),s(40656),s(40509),s(70546);var r=s(30170),n=s(45002),a=s(83876),i=s.n(a),o=s(66299),l={};for(let e in o)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>o[e]);s.d(t,l);let d=["",{children:["admin",{children:["settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,9092)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/settings/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(s.bind(s,49446)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/layout.tsx"],metadata:{icon:[async e=>(await Promise.resolve().then(s.bind(s,57481))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(s.bind(s,40656)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/layout.tsx"],error:[()=>Promise.resolve().then(s.bind(s,40509)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/error.tsx"],"not-found":[()=>Promise.resolve().then(s.bind(s,70546)),"/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/not-found.tsx"],metadata:{icon:[async e=>(await Promise.resolve().then(s.bind(s,57481))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}],c=["/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/admin/settings/page.tsx"],u="/admin/settings/page",h={require:s,loadChunk:()=>Promise.resolve()},p=new r.AppPageRouteModule({definition:{kind:n.x.APP_PAGE,page:"/admin/settings/page",pathname:"/admin/settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},76244:(e,t,s)=>{Promise.resolve().then(s.bind(s,60985)),Promise.resolve().then(s.bind(s,70099))},60782:(e,t,s)=>{"use strict";s.d(t,{SV:()=>c});var r=s(97247),n=s(28964),a=s.n(n),i=s(27757),o=s(58053),l=s(35921),d=s(28339);class c extends a().Component{constructor(e){super(e),this.handleRetry=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("Error caught by boundary:",e,t),console.error("Production error:",{error:e.message,stack:e.stack,componentStack:t.componentStack}),this.setState({hasError:!0,error:e,errorInfo:t})}render(){if(this.state.hasError){let{fallback:e}=this.props;return e&&this.state.error?r.jsx(e,{error:this.state.error,retry:this.handleRetry}):(0,r.jsxs)(i.Zb,{className:"max-w-lg mx-auto mt-8",children:[r.jsx(i.Ol,{children:(0,r.jsxs)(i.ll,{className:"flex items-center gap-2 text-destructive",children:[r.jsx(l.Z,{className:"h-5 w-5"}),"Something went wrong"]})}),(0,r.jsxs)(i.aY,{className:"space-y-4",children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"An unexpected error occurred. Please try refreshing the page or contact support if the problem persists."}),!1,(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(o.z,{onClick:this.handleRetry,variant:"outline",size:"sm",children:[r.jsx(d.Z,{className:"h-4 w-4 mr-2"}),"Try Again"]}),r.jsx(o.z,{onClick:()=>window.location.reload(),size:"sm",children:"Refresh Page"})]})]})]})}return this.props.children}}},70099:(e,t,s)=>{"use strict";s.d(t,{SettingsManager:()=>R});var r=s(97247),n=s(28964),a=s(27757),i=s(58053),o=s(70170),l=s(22394),d=s(44494),c=s(80526),u=s(84662),h=s(94049);function p(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}s(46817);var m=n.forwardRef((e,t)=>{let{children:s,...a}=e,i=n.Children.toArray(s),o=i.find(g);if(o){let e=o.props.children,s=i.map(t=>t!==o?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,r.jsx)(x,{...a,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,s):null})}return(0,r.jsx)(x,{...a,ref:t,children:s})});m.displayName="Slot";var x=n.forwardRef((e,t)=>{let{children:s,...r}=e;if(n.isValidElement(s)){let e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(s=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(s);return n.cloneElement(s,{...function(e,t){let s={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?s[r]=(...e)=>{a(...e),n(...e)}:n&&(s[r]=n):"style"===r?s[r]={...n,...a}:"className"===r&&(s[r]=[n,a].filter(Boolean).join(" "))}return{...e,...s}}(r,s.props),ref:t?function(...e){return t=>{let s=!1,r=e.map(e=>{let r=p(e,t);return s||"function"!=typeof r||(s=!0),r});if(s)return()=>{for(let t=0;t<r.length;t++){let s=r[t];"function"==typeof s?s():p(e[t],null)}}}}(t,e):e})}return n.Children.count(s)>1?n.Children.only(null):null});x.displayName="SlotClone";var f=({children:e})=>(0,r.jsx)(r.Fragment,{children:e});function g(e){return n.isValidElement(e)&&e.type===f}var v=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let s=n.forwardRef((e,s)=>{let{asChild:n,...a}=e,i=n?m:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(i,{...a,ref:s})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),j="horizontal",b=["horizontal","vertical"],y=n.forwardRef((e,t)=>{let{decorative:s,orientation:n=j,...a}=e,i=b.includes(n)?n:j;return(0,r.jsx)(v.div,{"data-orientation":i,...s?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"},...a,ref:t})});y.displayName="Separator";var w=s(25008);function k({className:e,orientation:t="horizontal",decorative:s=!0,...n}){return r.jsx(y,{"data-slot":"separator",decorative:s,orientation:t,className:(0,w.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}var N=s(10906),C=s(60985),S=s(60782),_=s(26323);let T=(0,_.Z)("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);var P=s(17712);let z=(0,_.Z)("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);var M=s(57989),E=s(72465),A=s(17316);let Z=(0,_.Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function R(){let[e,t]=(0,n.useState)({}),[s,p]=(0,n.useState)(!0),[m,x]=(0,n.useState)(!1),[f,g]=(0,n.useState)("general"),{toast:v}=(0,N.pm)(),j=async()=>{x(!0);try{if(!(await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw Error("Failed to save settings");v({title:"Success",description:"Settings saved successfully"})}catch(e){v({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{x(!1)}},b=(e,s)=>{t(t=>({...t,[e]:s}))},y=(e,s,r)=>{t(t=>({...t,[e]:{...t[e],[s]:r}}))},w=(t,s,r)=>{let n=[...e.businessHours||[]];n[t]||(n[t]={dayOfWeek:t,openTime:"09:00",closeTime:"17:00",isClosed:!1}),n[t]={...n[t],[s]:r},b("businessHours",n)};return s?r.jsx(C.LoadingSpinner,{}):r.jsx(S.SV,{children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)(u.Tabs,{value:f,onValueChange:g,className:"space-y-6",children:[(0,r.jsxs)(u.TabsList,{className:"grid w-full grid-cols-6",children:[(0,r.jsxs)(u.TabsTrigger,{value:"general",children:[r.jsx(T,{className:"mr-2 h-4 w-4"}),"General"]}),(0,r.jsxs)(u.TabsTrigger,{value:"business",children:[r.jsx(P.Z,{className:"mr-2 h-4 w-4"}),"Business"]}),(0,r.jsxs)(u.TabsTrigger,{value:"booking",children:[r.jsx(z,{className:"mr-2 h-4 w-4"}),"Booking"]}),(0,r.jsxs)(u.TabsTrigger,{value:"users",children:[r.jsx(M.Z,{className:"mr-2 h-4 w-4"}),"Users"]}),(0,r.jsxs)(u.TabsTrigger,{value:"appearance",children:[r.jsx(E.Z,{className:"mr-2 h-4 w-4"}),"Appearance"]}),(0,r.jsxs)(u.TabsTrigger,{value:"advanced",children:[r.jsx(A.Z,{className:"mr-2 h-4 w-4"}),"Advanced"]})]}),(0,r.jsxs)(u.TabsContent,{value:"general",className:"space-y-6",children:[(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Studio Information"}),r.jsx(a.SZ,{children:"Basic information about your tattoo studio."})]}),(0,r.jsxs)(a.aY,{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"studioName",children:"Studio Name"}),r.jsx(o.I,{id:"studioName",value:e.studioName||"",onChange:e=>b("studioName",e.target.value),placeholder:"United Tattoo Studio"})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"phone",children:"Phone Number"}),r.jsx(o.I,{id:"phone",value:e.phone||"",onChange:e=>b("phone",e.target.value),placeholder:"+1 (555) 123-4567"})]})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"description",children:"Description"}),r.jsx(d.g,{id:"description",value:e.description||"",onChange:e=>b("description",e.target.value),placeholder:"Describe your studio...",rows:3})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"address",children:"Address"}),r.jsx(d.g,{id:"address",value:e.address||"",onChange:e=>b("address",e.target.value),placeholder:"123 Main St, City, State 12345",rows:2})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"email",children:"Contact Email"}),r.jsx(o.I,{id:"email",type:"email",value:e.email||"",onChange:e=>b("email",e.target.value),placeholder:"contact@unitedtattoo.com"})]})]})]}),(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Social Media"}),r.jsx(a.SZ,{children:"Connect your social media accounts."})]}),r.jsx(a.aY,{className:"space-y-4",children:(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"instagram",children:"Instagram"}),r.jsx(o.I,{id:"instagram",value:e.socialMedia?.instagram||"",onChange:e=>y("socialMedia","instagram",e.target.value),placeholder:"@unitedtattoo"})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"facebook",children:"Facebook"}),r.jsx(o.I,{id:"facebook",value:e.socialMedia?.facebook||"",onChange:e=>y("socialMedia","facebook",e.target.value),placeholder:"facebook.com/unitedtattoo"})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"twitter",children:"Twitter"}),r.jsx(o.I,{id:"twitter",value:e.socialMedia?.twitter||"",onChange:e=>y("socialMedia","twitter",e.target.value),placeholder:"@unitedtattoo"})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"tiktok",children:"TikTok"}),r.jsx(o.I,{id:"tiktok",value:e.socialMedia?.tiktok||"",onChange:e=>y("socialMedia","tiktok",e.target.value),placeholder:"@unitedtattoo"})]})]})})]})]}),r.jsx(u.TabsContent,{value:"business",className:"space-y-6",children:(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Business Hours"}),r.jsx(a.SZ,{children:"Set your studio's operating hours for each day of the week."})]}),r.jsx(a.aY,{className:"space-y-4",children:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].map((t,s)=>(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:"w-24",children:r.jsx(l._,{children:t})}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[r.jsx(c.r,{checked:!e.businessHours?.[s]?.isClosed,onCheckedChange:e=>w(s,"isClosed",!e)}),r.jsx("span",{className:"text-sm text-muted-foreground",children:"Open"})]}),!e.businessHours?.[s]?.isClosed&&(0,r.jsxs)(r.Fragment,{children:[r.jsx(o.I,{type:"time",value:e.businessHours?.[s]?.openTime||"09:00",onChange:e=>w(s,"openTime",e.target.value),className:"w-32"}),r.jsx("span",{className:"text-muted-foreground",children:"to"}),r.jsx(o.I,{type:"time",value:e.businessHours?.[s]?.closeTime||"17:00",onChange:e=>w(s,"closeTime",e.target.value),className:"w-32"})]})]},s))})]})}),(0,r.jsxs)(u.TabsContent,{value:"booking",className:"space-y-6",children:[(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Booking Configuration"}),r.jsx(a.SZ,{children:"Configure how customers can book appointments."})]}),(0,r.jsxs)(a.aY,{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{children:"Online Booking"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow customers to book appointments online"})]}),r.jsx(c.r,{checked:e.bookingEnabled||!1,onCheckedChange:e=>b("bookingEnabled",e)})]}),r.jsx(k,{}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{children:"Online Payments"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept payments through the website"})]}),r.jsx(c.r,{checked:e.onlinePayments||!1,onCheckedChange:e=>b("onlinePayments",e)})]}),r.jsx(k,{}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{children:"Require Deposit"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Require a deposit for all bookings"})]}),r.jsx(c.r,{checked:e.requireDeposit||!1,onCheckedChange:e=>b("requireDeposit",e)})]}),e.requireDeposit&&(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"depositAmount",children:"Deposit Amount ($)"}),r.jsx(o.I,{id:"depositAmount",type:"number",value:e.depositAmount||50,onChange:e=>b("depositAmount",parseInt(e.target.value)),className:"w-32"})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"cancellationPolicy",children:"Cancellation Policy"}),r.jsx(d.g,{id:"cancellationPolicy",value:e.cancellationPolicy||"",onChange:e=>b("cancellationPolicy",e.target.value),placeholder:"Describe your cancellation policy...",rows:3})]})]})]}),(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Notifications"}),r.jsx(a.SZ,{children:"Configure how you receive booking notifications."})]}),(0,r.jsxs)(a.aY,{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{children:"Email Notifications"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive booking notifications via email"})]}),r.jsx(c.r,{checked:e.emailNotifications||!1,onCheckedChange:e=>b("emailNotifications",e)})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{children:"SMS Notifications"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive booking notifications via SMS"})]}),r.jsx(c.r,{checked:e.smsNotifications||!1,onCheckedChange:e=>b("smsNotifications",e)})]})]})]})]}),r.jsx(u.TabsContent,{value:"users",className:"space-y-6",children:(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"User Management"}),r.jsx(a.SZ,{children:"Manage user roles and permissions."})]}),r.jsx(a.aY,{children:r.jsx("p",{className:"text-muted-foreground",children:"User management features will be implemented in a future update. This will include role-based access control, user invitations, and permission management."})})]})}),r.jsx(u.TabsContent,{value:"appearance",className:"space-y-6",children:(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Theme & Appearance"}),r.jsx(a.SZ,{children:"Customize the look and feel of your admin dashboard."})]}),(0,r.jsxs)(a.aY,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"theme",children:"Theme"}),(0,r.jsxs)(h.Ph,{value:e.theme||"system",onValueChange:e=>b("theme",e),children:[r.jsx(h.i4,{className:"w-48",children:r.jsx(h.ki,{})}),(0,r.jsxs)(h.Bw,{children:[r.jsx(h.Ql,{value:"light",children:"Light"}),r.jsx(h.Ql,{value:"dark",children:"Dark"}),r.jsx(h.Ql,{value:"system",children:"System"})]})]})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"language",children:"Language"}),(0,r.jsxs)(h.Ph,{value:e.language||"en",onValueChange:e=>b("language",e),children:[r.jsx(h.i4,{className:"w-48",children:r.jsx(h.ki,{})}),(0,r.jsxs)(h.Bw,{children:[r.jsx(h.Ql,{value:"en",children:"English"}),r.jsx(h.Ql,{value:"es",children:"Spanish"}),r.jsx(h.Ql,{value:"fr",children:"French"})]})]})]}),(0,r.jsxs)("div",{children:[r.jsx(l._,{htmlFor:"timezone",children:"Timezone"}),(0,r.jsxs)(h.Ph,{value:e.timezone||"America/New_York",onValueChange:e=>b("timezone",e),children:[r.jsx(h.i4,{className:"w-64",children:r.jsx(h.ki,{})}),(0,r.jsxs)(h.Bw,{children:[r.jsx(h.Ql,{value:"America/New_York",children:"Eastern Time"}),r.jsx(h.Ql,{value:"America/Chicago",children:"Central Time"}),r.jsx(h.Ql,{value:"America/Denver",children:"Mountain Time"}),r.jsx(h.Ql,{value:"America/Los_Angeles",children:"Pacific Time"})]})]})]})]})]})}),r.jsx(u.TabsContent,{value:"advanced",className:"space-y-6",children:(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[r.jsx(a.ll,{children:"Advanced Settings"}),r.jsx(a.SZ,{children:"Advanced configuration options for your studio."})]}),r.jsx(a.aY,{children:r.jsx("p",{className:"text-muted-foreground",children:"Advanced settings such as API configurations, integrations, and system preferences will be available in future updates."})})]})})]}),r.jsx("div",{className:"flex justify-end",children:r.jsx(i.z,{onClick:j,disabled:m,children:m?(0,r.jsxs)(r.Fragment,{children:[r.jsx(C.LoadingSpinner,{}),"Saving..."]}):(0,r.jsxs)(r.Fragment,{children:[r.jsx(Z,{className:"mr-2 h-4 w-4"}),"Save Settings"]})})})]})})}},94049:(e,t,s)=>{"use strict";s.d(t,{Bw:()=>h,Ph:()=>d,Ql:()=>p,i4:()=>u,ki:()=>c});var r=s(97247),n=s(52846),a=s(62513),i=s(48799),o=s(45370),l=s(25008);function d({...e}){return r.jsx(n.fC,{"data-slot":"select",...e})}function c({...e}){return r.jsx(n.B4,{"data-slot":"select-value",...e})}function u({className:e,size:t="default",children:s,...i}){return(0,r.jsxs)(n.xz,{"data-slot":"select-trigger","data-size":t,className:(0,l.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[s,r.jsx(n.JO,{asChild:!0,children:r.jsx(a.Z,{className:"size-4 opacity-50"})})]})}function h({className:e,children:t,position:s="popper",...a}){return r.jsx(n.h_,{children:(0,r.jsxs)(n.VY,{"data-slot":"select-content",className:(0,l.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...a,children:[r.jsx(m,{}),r.jsx(n.l_,{className:(0,l.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),r.jsx(x,{})]})})}function p({className:e,children:t,...s}){return(0,r.jsxs)(n.ck,{"data-slot":"select-item",className:(0,l.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[r.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:r.jsx(n.wU,{children:r.jsx(i.Z,{className:"size-4"})})}),r.jsx(n.eT,{children:t})]})}function m({className:e,...t}){return r.jsx(n.u_,{"data-slot":"select-scroll-up-button",className:(0,l.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(o.Z,{className:"size-4"})})}function x({className:e,...t}){return r.jsx(n.$G,{"data-slot":"select-scroll-down-button",className:(0,l.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(a.Z,{className:"size-4"})})}},80526:(e,t,s)=>{"use strict";s.d(t,{r:()=>i});var r=s(97247);s(28964);var n=s(23473),a=s(25008);function i({className:e,...t}){return r.jsx(n.fC,{"data-slot":"switch",className:(0,a.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:r.jsx(n.bU,{"data-slot":"switch-thumb",className:(0,a.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}},84662:(e,t,s)=>{"use strict";s.d(t,{Tabs:()=>i,TabsContent:()=>d,TabsList:()=>o,TabsTrigger:()=>l});var r=s(97247);s(28964);var n=s(73664),a=s(25008);function i({className:e,...t}){return r.jsx(n.fC,{"data-slot":"tabs",className:(0,a.cn)("flex flex-col gap-2",e),...t})}function o({className:e,...t}){return r.jsx(n.aV,{"data-slot":"tabs-list",className:(0,a.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function l({className:e,...t}){return r.jsx(n.xz,{"data-slot":"tabs-trigger",className:(0,a.cn)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function d({className:e,...t}){return r.jsx(n.VY,{"data-slot":"tabs-content",className:(0,a.cn)("flex-1 outline-none",e),...t})}},44494:(e,t,s)=>{"use strict";s.d(t,{g:()=>a});var r=s(97247);s(28964);var n=s(25008);function a({className:e,...t}){return r.jsx("textarea",{"data-slot":"textarea",className:(0,n.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}},17712:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});let r=(0,s(26323).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},8749:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});let r=(0,s(26323).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9092:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l,metadata:()=>o});var r=s(72051),n=s(26269);let a=(0,s(45347).createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/settings-manager.tsx#SettingsManager`);var i=s(15487);let o={title:"Settings | United Tattoo Admin",description:"Manage studio settings and configuration"};function l(){return(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:"Settings"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage studio settings, user permissions, and system configuration."})]}),r.jsx(n.Suspense,{fallback:r.jsx(i.TK,{}),children:r.jsx(a,{})})]})}},23473:(e,t,s)=>{"use strict";s.d(t,{fC:()=>N,bU:()=>C});var r=s(28964);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let s=!1,r=e.map(e=>{let r=n(e,t);return s||"function"!=typeof r||(s=!0),r});if(s)return()=>{for(let t=0;t<r.length;t++){let s=r[t];"function"==typeof s?s():n(e[t],null)}}}}var i=s(97247);function o(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}var l=globalThis?.document?r.useLayoutEffect:()=>{};s(46817);var d=r.forwardRef((e,t)=>{let{children:s,...n}=e,a=r.Children.toArray(s),o=a.find(h);if(o){let e=o.props.children,s=a.map(t=>t!==o?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,i.jsx)(c,{...n,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,s):null})}return(0,i.jsx)(c,{...n,ref:t,children:s})});d.displayName="Slot";var c=r.forwardRef((e,t)=>{let{children:s,...n}=e;if(r.isValidElement(s)){let e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(s=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(s);return r.cloneElement(s,{...function(e,t){let s={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?s[r]=(...e)=>{a(...e),n(...e)}:n&&(s[r]=n):"style"===r?s[r]={...n,...a}:"className"===r&&(s[r]=[n,a].filter(Boolean).join(" "))}return{...e,...s}}(n,s.props),ref:t?a(t,e):e})}return r.Children.count(s)>1?r.Children.only(null):null});c.displayName="SlotClone";var u=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});function h(e){return r.isValidElement(e)&&e.type===u}var p=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let s=r.forwardRef((e,s)=>{let{asChild:r,...n}=e,a=r?d:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a,{...n,ref:s})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),m="Switch",[x,f]=function(e,t=[]){let s=[],n=()=>{let t=s.map(e=>r.createContext(e));return function(s){let n=s?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...s,[e]:n}}),[s,n])}};return n.scopeName=e,[function(t,n){let a=r.createContext(n),o=s.length;s=[...s,n];let l=t=>{let{scope:s,children:n,...l}=t,d=s?.[e]?.[o]||a,c=r.useMemo(()=>l,Object.values(l));return(0,i.jsx)(d.Provider,{value:c,children:n})};return l.displayName=t+"Provider",[l,function(s,i){let l=i?.[e]?.[o]||a,d=r.useContext(l);if(d)return d;if(void 0!==n)return n;throw Error(`\`${s}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let s=()=>{let s=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=s.reduce((t,{useScope:s,scopeName:r})=>{let n=s(e)[`__scope${r}`];return{...t,...n}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return s.scopeName=t.scopeName,s}(n,...t)]}(m),[g,v]=x(m),j=r.forwardRef((e,t)=>{let{__scopeSwitch:s,name:n,checked:l,defaultChecked:d,required:c,disabled:u,value:h="on",onCheckedChange:m,form:x,...f}=e,[v,j]=r.useState(null),b=function(...e){return r.useCallback(a(...e),e)}(t,e=>j(e)),y=r.useRef(!1),N=!v||x||!!v.closest("form"),[C=!1,S]=function({prop:e,defaultProp:t,onChange:s=()=>{}}){let[n,a]=function({defaultProp:e,onChange:t}){let s=r.useState(e),[n]=s,a=r.useRef(n),i=o(t);return r.useEffect(()=>{a.current!==n&&(i(n),a.current=n)},[n,a,i]),s}({defaultProp:t,onChange:s}),i=void 0!==e,l=i?e:n,d=o(s);return[l,r.useCallback(t=>{if(i){let s="function"==typeof t?t(e):t;s!==e&&d(s)}else a(t)},[i,e,a,d])]}({prop:l,defaultProp:d,onChange:m});return(0,i.jsxs)(g,{scope:s,checked:C,disabled:u,children:[(0,i.jsx)(p.button,{type:"button",role:"switch","aria-checked":C,"aria-required":c,"data-state":k(C),"data-disabled":u?"":void 0,disabled:u,value:h,...f,ref:b,onClick:function(e,t,{checkForDefaultPrevented:s=!0}={}){return function(r){if(e?.(r),!1===s||!r.defaultPrevented)return t?.(r)}}(e.onClick,e=>{S(e=>!e),N&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),N&&(0,i.jsx)(w,{control:v,bubbles:!y.current,name:n,value:h,checked:C,required:c,disabled:u,form:x,style:{transform:"translateX(-100%)"}})]})});j.displayName=m;var b="SwitchThumb",y=r.forwardRef((e,t)=>{let{__scopeSwitch:s,...r}=e,n=v(b,s);return(0,i.jsx)(p.span,{"data-state":k(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});y.displayName=b;var w=e=>{let{control:t,checked:s,bubbles:n=!0,...a}=e,o=r.useRef(null),d=function(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(s),c=function(e){let[t,s]=r.useState(void 0);return l(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,n;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,n=t.blockSize}else r=e.offsetWidth,n=e.offsetHeight;s({width:r,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}s(void 0)},[e]),t}(t);return r.useEffect(()=>{let e=o.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(d!==s&&t){let r=new Event("click",{bubbles:n});t.call(e,s),e.dispatchEvent(r)}},[d,s,n]),(0,i.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...a,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function k(e){return e?"checked":"unchecked"}var N=j,C=y},20840:(e,t,s)=>{"use strict";s.d(t,{C2:()=>i,fC:()=>l});var r=s(28964),n=s(22251),a=s(97247),i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef((e,t)=>(0,a.jsx)(n.WV.span,{...e,ref:t,style:{...i,...e.style}}));o.displayName="VisuallyHidden";var l=o}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[9379,3670,1488,1511,4080,4128,6082,6758,2092,7837,817,3664,5314,4106,5593,8673],()=>s(3730));module.exports=r})();