(()=>{var e={};e.id=5792,e.ids=[5792],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")},6202:(e,t,a)=>{"use strict";a.r(t),a.d(t,{GlobalError:()=>l.a,__next_app__:()=>m,originalPathname:()=>x,pages:()=>c,routeModule:()=>p,tree:()=>o}),a(60181),a(88851),a(46157),a(35866);var r=a(23191),s=a(88716),i=a(37922),l=a.n(i),n=a(95231),d={};for(let e in n)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>n[e]);a.d(t,d);let o=["",{children:["affiliate",{children:["referrals",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,60181)),"D:\\PROJECT\\resto-saas\\src\\app\\affiliate\\referrals\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(a.bind(a,88851)),"D:\\PROJECT\\resto-saas\\src\\app\\affiliate\\layout.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,46157)),"D:\\PROJECT\\resto-saas\\src\\app\\layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,35866,23)),"next/dist/client/components/not-found-error"]}],c=["D:\\PROJECT\\resto-saas\\src\\app\\affiliate\\referrals\\page.tsx"],x="/affiliate/referrals/page",m={require:a,loadChunk:()=>Promise.resolve()},p=new r.AppPageRouteModule({definition:{kind:s.x.APP_PAGE,page:"/affiliate/referrals/page",pathname:"/affiliate/referrals",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},26731:(e,t,a)=>{Promise.resolve().then(a.bind(a,9977))},9977:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>l});var r=a(10326),s=a(17577),i=a(24061);function l(){let[e,t]=(0,s.useState)([]),[a,l]=(0,s.useState)(!0);return a?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-600"})}):(0,r.jsxs)("div",{className:"space-y-6",children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Referral Saya"}),r.jsx("div",{className:"card",children:e.length>0?r.jsx("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-200",children:[r.jsx("th",{className:"text-left py-3 font-medium text-gray-500",children:"Nama Tenant"}),r.jsx("th",{className:"text-left py-3 font-medium text-gray-500",children:"Paket"}),r.jsx("th",{className:"text-center py-3 font-medium text-gray-500",children:"Status"}),r.jsx("th",{className:"text-right py-3 font-medium text-gray-500",children:"Total Komisi"}),r.jsx("th",{className:"text-right py-3 font-medium text-gray-500",children:"Bergabung"})]})}),r.jsx("tbody",{children:e.map(e=>(0,r.jsxs)("tr",{className:"border-b border-gray-100",children:[r.jsx("td",{className:"py-3 text-gray-900 font-medium",children:e.name}),r.jsx("td",{className:"py-3",children:r.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium ${"free"===e.plan?"bg-gray-100 text-gray-600":"bg-emerald-100 text-emerald-700"}`,children:e.plan})}),r.jsx("td",{className:"py-3 text-center",children:r.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium ${e.isActive?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:e.isActive?"Aktif":"Nonaktif"})}),(0,r.jsxs)("td",{className:"py-3 text-right text-gray-600",children:[e.totalCommissions,"x"]}),r.jsx("td",{className:"py-3 text-right text-gray-500",children:new Date(e.createdAt).toLocaleDateString("id-ID")})]},e.id))})]})}):(0,r.jsxs)("div",{className:"text-center py-12",children:[r.jsx(i.Z,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),r.jsx("p",{className:"text-gray-500",children:"Belum ada referral"}),r.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Bagikan kode referral Anda untuk mulai mendapatkan komisi"})]})})]})}},60181:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>r});let r=(0,a(68570).createProxy)(String.raw`D:\PROJECT\resto-saas\src\app\affiliate\referrals\page.tsx#default`)}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[8948,7746,9404,7629],()=>a(6202));module.exports=r})();