Files
webshop/build_temp/.next/static/chunks/0d83uz0cb9cr0.js
2026-06-22 21:12:46 +02:00

1 line
20 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}e.s(["composeRefs",0,a,"useComposedRefs",0,function(...e){return t.useCallback(a(...e),e)}])},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),a=e.i(20783),n=e.i(43476),s=Symbol("radix.slottable");function i(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var s,l;let o,d,c,u=(l=s=`Primitive.${r}`,(o=t.forwardRef((e,r)=>{let{children:n,...s}=e;if(t.isValidElement(n)){var i;let e,l,o=(i=n,(l=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(l=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),d=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(s,n.props);return n.type!==t.Fragment&&(d.ref=r?(0,a.composeRefs)(r,o):o),t.cloneElement(n,d)}return t.Children.count(n)>1?t.Children.only(null):null})).displayName=`${l}.SlotClone`,d=o,(c=t.forwardRef((e,r)=>{let{children:a,...s}=e,l=t.Children.toArray(a),o=l.find(i);if(o){let e=o.props.children,a=l.map(r=>r!==o?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,n.jsx)(d,{...s,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(d,{...s,ref:r,children:a})})).displayName=`${s}.Slot`,c),f=t.forwardRef((e,t)=>{let{asChild:a,...s}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,n.jsx)(a?u:r,{...s,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});e.s(["Primitive",0,l,"dispatchDiscreteCustomEvent",0,function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}],48425)},25913,e=>{"use strict";var t=e.i(7670);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=t.clsx;e.s(["cva",0,(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:i,defaultVariants:l}=t,o=Object.keys(i).map(e=>{let t=null==n?void 0:n[e],a=null==l?void 0:l[e];if(null===t)return null;let s=r(t)||r(a);return i[e][s]}),d=n&&Object.entries(n).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return a(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...d}[t]):({...l,...d})[t]===r})?[...e,r,a]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},67881,9840,e=>{"use strict";var t=e.i(43476),r=e.i(25913),a=e.i(71645),n=e.i(20783);function s(e){var r;let s,i=(r=e,(s=a.forwardRef((e,t)=>{let{children:r,...s}=e;if(a.isValidElement(r)){var i;let e,l,o=(i=r,(l=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(l=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),d=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(s,r.props);return r.type!==a.Fragment&&(d.ref=t?(0,n.composeRefs)(t,o):o),a.cloneElement(r,d)}return a.Children.count(r)>1?a.Children.only(null):null})).displayName=`${r}.SlotClone`,s),l=a.forwardRef((e,r)=>{let{children:n,...s}=e,l=a.Children.toArray(n),o=l.find(c);if(o){let e=o.props.children,n=l.map(t=>t!==o?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,t.jsx)(i,{...s,ref:r,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,t.jsx)(i,{...s,ref:r,children:n})});return l.displayName=`${e}.Slot`,l}var i=s("Slot"),l=Symbol("radix.slottable");function o(e){let r=({children:e})=>(0,t.jsx)(t.Fragment,{children:e});return r.displayName=`${e}.Slottable`,r.__radixId=l,r}var d=o("Slottable");function c(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}e.s(["Root",0,i,"Slot",0,i,"Slottable",0,d,"createSlot",0,s,"createSlottable",0,o],43556);var u=e.i(43556);e.s(["Slot",0,u],9840);var u=u,f=e.i(47163);let h=(0,r.cva)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:r="default",size:a="default",asChild:n=!1,...s}){let i=n?u.Root:"button";return(0,t.jsx)(i,{"data-slot":"button","data-variant":r,"data-size":a,className:(0,f.cn)(h({variant:r,size:a,className:e})),...s})}],67881)},70065,e=>{"use strict";var t=e.i(43476),r=e.i(47163);e.s(["Card",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a})},"CardFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",e),...a})}])},10708,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(48425),n=r.forwardRef((e,r)=>(0,t.jsx)(a.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));n.displayName="Label",e.s(["Label",0,n,"Root",0,n],44461);var s=e.i(44461),s=s,i=e.i(47163);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(s.Root,{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],10708)},23750,e=>{"use strict";var t=e.i(43476),r=e.i(47163);e.s(["Input",0,function({className:e,type:a,...n}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}])},18566,(e,t,r)=>{t.exports=e.r(76562)},47627,e=>{"use strict";var t=e.i(43476),r=e.i(47163);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,r.cn)("[&_tr:last-child]:border-0",e),...a})},"TableCaption",0,function({className:e,...a}){return(0,t.jsx)("caption",{"data-slot":"table-caption",className:(0,r.cn)("mt-4 text-sm text-muted-foreground",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,r.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})},"TableFooter",0,function({className:e,...a}){return(0,t.jsx)("tfoot",{"data-slot":"table-footer",className:(0,r.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,r.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,r.cn)("[&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,r.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a})}])},94179,e=>{"use strict";var t=e.i(43476),r=e.i(25913),a=e.i(47163);let n=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(n({variant:r}),e),...s})}])},75254,e=>{"use strict";var t=e.i(71645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:l="",children:o,iconNode:d,...c},u)=>(0,t.createElement)("svg",{ref:u,...n,width:r,height:r,stroke:e,strokeWidth:i?24*Number(s)/Number(r):s,className:a("lucide",l),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(o)?o:[o]]));e.s(["default",0,(e,n)=>{let i=(0,t.forwardRef)(({className:i,...l},o)=>(0,t.createElement)(s,{ref:o,iconNode:n,className:a(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...l}));return i.displayName=r(e),i}],75254)},95187,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return s.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=e.r(32120),i=e.r(92245),l=e.r(35326)},27612,e=>{"use strict";let t=(0,e.i(75254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],27612)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7233)},67978,e=>{"use strict";var t=e.i(43476),r=e.i(18566),a=e.i(47627),n=e.i(70065),s=e.i(75254);let i=(0,s.default)("user-x",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),l=(0,s.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),o=(0,s.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);var d=e.i(27612);let c=(0,s.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);var u=e.i(67881),f=e.i(95187);let h=(0,f.createServerReference)("40754fb1921e61318fdfee6eb02cbcd7118ad5bfd4",f.callServer,void 0,f.findSourceMapURL,"deleteUser"),p=(0,f.createServerReference)("60f860e2cdd1f53f949d1f31f85f5320b81ffa2491",f.callServer,void 0,f.findSourceMapURL,"updateUserStatus"),m=(0,f.createServerReference)("406d01f3d29890da62989fa40f7a68722384aa195c",f.callServer,void 0,f.findSourceMapURL,"resetPassword");var x=e.i(94179);e.s(["UserList",0,function({initialUsers:e}){let s=(0,r.useRouter)(),f=async e=>{confirm("Möchten Sie diesen Benutzer wirklich löschen?")&&(await h(e),s.refresh())},b=async(e,t)=>{await p(e,!t),s.refresh()},g=async e=>{try{await m(e),alert("Password-Reset Link generiert (siehe Mailpit/Supabase Log)")}catch(e){alert("Fehler beim Passwort-Reset")}};return(0,t.jsxs)(n.Card,{className:"glass-dark border-white/10 shadow-2xl overflow-hidden",children:[(0,t.jsxs)(n.CardHeader,{children:[(0,t.jsx)(n.CardTitle,{children:"Benutzerverwaltung"}),(0,t.jsx)(n.CardDescription,{className:"text-slate-400",children:"Hier können Sie Benutzer neu anlegen, sperren oder Passwörter zurücksetzen."})]}),(0,t.jsx)(n.CardContent,{children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(a.TableHeader,{children:(0,t.jsxs)(a.TableRow,{className:"border-white/10 hover:bg-white/5",children:[(0,t.jsx)(a.TableHead,{className:"text-slate-200",children:"E-Mail"}),(0,t.jsx)(a.TableHead,{className:"text-slate-200",children:"Status"}),(0,t.jsx)(a.TableHead,{className:"text-slate-200",children:"Zuletzt angemeldet"}),(0,t.jsx)(a.TableHead,{className:"text-right text-slate-200",children:"Aktionen"})]})}),(0,t.jsx)(a.TableBody,{children:e.map(e=>{let r=!!e.banned_until;return(0,t.jsxs)(a.TableRow,{className:"border-white/5 hover:bg-white/5 transition-colors",children:[(0,t.jsx)(a.TableCell,{className:"font-medium text-white",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c,{className:"w-4 h-4 text-slate-500"}),e.email]})}),(0,t.jsx)(a.TableCell,{children:(0,t.jsx)(x.Badge,{variant:r?"destructive":"default",className:r?"":"bg-green-500/20 text-green-500 border-green-500/30",children:r?"Gesperrt":"Aktiv"})}),(0,t.jsx)(a.TableCell,{className:"text-slate-400 text-sm",children:e.last_sign_in_at?new Date(e.last_sign_in_at).toLocaleString("de-DE"):"Noch nie"}),(0,t.jsx)(a.TableCell,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-yellow-500 hover:text-yellow-400 hover:bg-yellow-500/10",title:"Passwort zurücksetzen",onClick:()=>g(e.email),children:(0,t.jsx)(o,{className:"h-4 w-4"})}),(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:`h-8 w-8 ${r?"text-green-500 hover:text-green-400 hover:bg-green-500/10":"text-orange-500 hover:text-orange-400 hover:bg-orange-500/10"}`,title:r?"Entsperren":"Sperren",onClick:()=>b(e.id,r),children:r?(0,t.jsx)(l,{className:"h-4 w-4"}):(0,t.jsx)(i,{className:"h-4 w-4"})}),(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",title:"Löschen",onClick:()=>f(e.id),children:(0,t.jsx)(d.Trash2,{className:"h-4 w-4"})})]})})]},e.id)})})]})})]})}],67978)},48999,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(18566),n=e.i(53145),s=e.i(94814),i=e.i(62201),l=e.i(30374),o=e.i(74946),d=e.i(23750),c=e.i(67881),u=e.i(95187);let f=(0,u.createServerReference)("40bcd2e55053d75f38f9f2dfa368ab3f5dcfddffc1",u.callServer,void 0,u.findSourceMapURL,"createUser");var h=e.i(7233);let p=i.object({email:i.string().email("Ungültige E-Mail-Adresse"),password:i.string().min(6,"Passwort muss mindestens 6 Zeichen lang sein").optional()});e.s(["UserDialog",0,function(){let[e,i]=(0,r.useState)(!1),u=(0,a.useRouter)(),m=(0,n.useForm)({resolver:(0,s.zodResolver)(p),defaultValues:{email:"",password:""}});async function x(e){try{await f(e),i(!1),m.reset(),u.refresh()}catch(e){console.error("Error creating user:",e)}}return(0,t.jsxs)(l.Dialog,{open:e,onOpenChange:i,children:[(0,t.jsx)(l.DialogTrigger,{asChild:!0,children:(0,t.jsxs)(c.Button,{className:"bg-primary hover:bg-primary/90",children:[(0,t.jsx)(h.Plus,{className:"mr-2 h-4 w-4"})," Benutzer neu anlegen"]})}),(0,t.jsxs)(l.DialogContent,{className:"glass-dark border-white/10 text-white shadow-2xl",children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Neuen Benutzer anlegen"}),(0,t.jsx)(l.DialogDescription,{className:"text-slate-300",children:"Geben Sie die E-Mail und optional ein Passwort für den neuen Benutzer ein."})]}),(0,t.jsx)(o.Form,{...m,children:(0,t.jsxs)("form",{onSubmit:m.handleSubmit(x),className:"space-y-4",children:[(0,t.jsx)(o.FormField,{control:m.control,name:"email",render:({field:e})=>(0,t.jsxs)(o.FormItem,{children:[(0,t.jsx)(o.FormLabel,{className:"text-white",children:"E-Mail"}),(0,t.jsx)(o.FormControl,{children:(0,t.jsx)(d.Input,{placeholder:"user@example.com",className:"bg-white/5 border-white/10 text-white",...e})}),(0,t.jsx)(o.FormMessage,{})]})}),(0,t.jsx)(o.FormField,{control:m.control,name:"password",render:({field:e})=>(0,t.jsxs)(o.FormItem,{children:[(0,t.jsx)(o.FormLabel,{className:"text-white",children:"Passwort (optional)"}),(0,t.jsx)(o.FormControl,{children:(0,t.jsx)(d.Input,{type:"password",placeholder:"Passwort leer lassen für Zufall",className:"bg-white/5 border-white/10 text-white",...e})}),(0,t.jsx)(o.FormMessage,{})]})}),(0,t.jsx)(l.DialogFooter,{children:(0,t.jsx)(c.Button,{type:"submit",className:"w-full bg-primary hover:bg-primary/90",children:"Benutzer erstellen"})})]})})]})]})}],48999)}]);