module.exports=[125156,a=>{"use strict";var b=a.i(572131);a.s(["useSession",0,function(){let[a,c]=(0,b.useState)(null),[d,e]=(0,b.useState)(!0);return(0,b.useEffect)(()=>{fetch("/api/auth/session").then(a=>a.json()).then(a=>{a.success&&a.data&&c(a.data)}).catch(()=>{}).finally(()=>{e(!1)})},[]),{data:a,sessionLoading:d}}])},905029,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(53569),e=a.i(705151),f=a.i(533441),g=a.i(973549),h=a.i(125156),i=a.i(28915);a.s(["default",0,()=>{let{data:a,sessionLoading:j}=(0,h.useSession)(),[k,l]=(0,c.useState)(!1),m=a?.phone?`/auth/signup?ref=${a.phone}`:"",n=async()=>{if(m)try{await navigator.clipboard.writeText(m),l(!0),i.toast.success("রেফারেল লিংক কপি হয়েছে!"),setTimeout(()=>l(!1),3e3)}catch{i.toast.error("কপি করতে ব্যর্থ হয়েছে")}};return(0,b.jsx)(g.default,{children:(0,b.jsxs)("div",{className:"mx-auto max-w-2xl",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsx)("h1",{className:"font-bangla text-2xl font-bold text-gray-900 dark:text-white",children:"রেফারেল লিংক"}),(0,b.jsx)("p",{className:"font-bangla text-sm text-gray-500 dark:text-gray-400 mt-1",children:"এই লিংক শেয়ার করুন, নতুন ব্যবহারকারী সাইন আপ করলে আপনার ফোন নম্বর স্বয়ংক্রিয়ভাবে রেফারেল হিসেবে যুক্ত হবে"})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center space-x-3 mb-4",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-primary to-appSecondary",children:(0,b.jsx)(d.Share2,{className:"h-5 w-5 text-white"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"font-bangla text-lg font-semibold text-gray-900 dark:text-white",children:"আপনার রেফারেল লিংক"}),(0,b.jsxs)("p",{className:"font-bangla text-xs text-gray-500 dark:text-gray-400",children:["ফোন: ",a?.phone||"লোড হচ্ছে..."]})]})]}),j?(0,b.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,b.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"mb-4 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-900 p-4",children:(0,b.jsx)("p",{className:"break-all text-sm font-mono text-gray-700 dark:text-gray-300",children:m})}),(0,b.jsx)("button",{onClick:n,className:`flex w-full items-center justify-center space-x-2 rounded-lg px-4 py-3 text-sm font-medium transition-all ${k?"bg-green-500 text-white":"bg-gradient-to-r from-primary to-appSecondary text-white hover:opacity-90"}`,children:k?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Check,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"font-bangla",children:"কপি হয়েছে!"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.Copy,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"font-bangla",children:"লিংক কপি করুন"})]})})]})]}),(0,b.jsxs)("div",{className:"mt-6 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 p-6 shadow-sm",children:[(0,b.jsx)("h3",{className:"font-bangla text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"কিভাবে কাজ করে?"}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"১"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"font-bangla text-sm font-medium text-gray-900 dark:text-white",children:"লিংক কপি করুন"}),(0,b.jsx)("p",{className:"font-bangla text-xs text-gray-500 dark:text-gray-400",children:'উপরের "লিংক কপি করুন" বাটনে ক্লিক করুন'})]})]}),(0,b.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"২"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"font-bangla text-sm font-medium text-gray-900 dark:text-white",children:"লিংক শেয়ার করুন"}),(0,b.jsx)("p",{className:"font-bangla text-xs text-gray-500 dark:text-gray-400",children:"আপনার পরিচিতদের কাছে এই লিংক পাঠান"})]})]}),(0,b.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"৩"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"font-bangla text-sm font-medium text-gray-900 dark:text-white",children:"স্বয়ংক্রিয় রেফারেল"}),(0,b.jsx)("p",{className:"font-bangla text-xs text-gray-500 dark:text-gray-400",children:"নতুন ব্যবহারকারী এই লিংক দিয়ে সাইন আপ করলে আপনার ফোন নম্বর রেফারেল ফিল্ডে স্বয়ংক্রিয়ভাবে বসে যাবে"})]})]})]})]})]})})}])}];

//# sourceMappingURL=src_0-tgpx.._.js.map