import{jsxs as r,jsx as e}from"react/jsx-runtime";import{B as m}from"./button-BvFBRYHq.js";import{C as p,b as c,c as l,d as h,a as u}from"./card-Zg0WOx-j.js";import{I as b}from"./input-qMvM9qch.js";import{L as f}from"./label-DMnntKPk.js";import{A as w}from"./layout-CssQHtfO.js";import{useForm as g,Head as k}from"@inertiajs/react";import{Settings as _,Webhook as S,Save as x}from"lucide-react";import"@radix-ui/react-slot";import"class-variance-authority";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"@radix-ui/react-label";import"./app-sidebar-header-BX2s-HO_.js";import"react";import"@radix-ui/react-collapsible";import"./dropdown-menu-BP80qPHw.js";import"@radix-ui/react-dropdown-menu";import"./app-logo-icon-beRg1XGs.js";import"./fonts-CqawFh47.js";import"@radix-ui/react-dialog";import"@radix-ui/react-tooltip";import"@radix-ui/react-avatar";import"../app.js";/* empty css     */import"axios";import"sonner";import"react-dom/client";import"./toaster-DuLpwsc2.js";const v=[{title:"Admin",href:"/admin"},{title:"Reward",href:"#"},{title:"Top Spender",href:"/admin/reward/topspender"},{title:"Settings",href:"/admin/reward/topspender/settings"}];function re({settings:i}){const{data:s,setData:a,post:d,processing:n,errors:o}=g({discord_webhook_url:i.discord_webhook_url});return r(w,{breadcrumbs:v,children:[e(k,{title:"Top Spender Settings"}),r("div",{className:"space-y-6",children:[r("div",{children:[r("h2",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[e(_,{className:"h-6 w-6"}),"Top Spender Settings"]}),e("p",{className:"text-muted-foreground",children:"Configure Discord webhook notifications for reward distribution"})]}),r(p,{children:[r(c,{children:[r(l,{className:"flex items-center gap-2",children:[e(S,{className:"h-5 w-5"}),"Discord Webhook"]}),e(h,{children:"Enter your Discord webhook URL to receive notifications when rewards are sent to top spenders"})]}),e(u,{children:r("form",{onSubmit:t=>{t.preventDefault(),d("/admin/reward/topspender/settings")},className:"space-y-6",children:[r("div",{className:"space-y-2",children:[e(f,{htmlFor:"discord_webhook_url",children:"Webhook URL"}),e(b,{id:"discord_webhook_url",type:"url",placeholder:"https://discord.com/api/webhooks/...",value:s.discord_webhook_url,onChange:t=>a("discord_webhook_url",t.target.value)}),o.discord_webhook_url&&e("p",{className:"text-destructive text-sm",children:o.discord_webhook_url}),e("p",{className:"text-muted-foreground text-xs",children:"The webhook will receive an embed message with reward distribution details including rank, character name, item, and status"})]}),r(m,{type:"submit",disabled:n,children:[e(x,{className:"mr-2 h-4 w-4"}),"Save Settings"]})]})})]})]})]})}export{re as default};
