import{K as i,j as e}from"./app-BCeTiNoJ.js";import{c as n}from"./utils-3hq7z6vD.js";import{t as x}from"./bundle-mjs-AdmevC4f.js";import{C as d}from"./CreditIcon-Bj-VuvP2.js";import{R as m,F as p,T as h}from"./TimerIcon-DIdyDuN0.js";const b=({plan:t})=>{const o={imagen:"API Credits",video_fusion:"API Credits",auto_ai:"API Credits",train_master:"API Credits",uncensored_chat:"Tokens",audio_gen:"Minutes",three_d_verse:"API Credits"},a=i().props.trial_user_behaviour,r=i().props.auth.user;let s=a==="should_add_card";return a==="should_add_card"&&r==null&&(s=!0),a==="should_add_card"&&(r==null?void 0:r.doesNotNeedTrialBenefit)===!0&&(s=!1),e.jsxs("div",{"data-type":t.type,"data-category":t.category,className:x(n("group relative flex w-full max-w-xs flex-col gap-4 rounded-[20px] border border-[#E5E7EB] bg-white p-5 px-5 py-4 duration-500 hover:border-[#BABABA] hover:shadow dark:border-[#3E3E3E] dark:bg-[#111827] dark:hover:border-[#BABABA]","isolate data-[type=standard]:border-[#005CF0] hover:data-[type=standard]:border-[#005CF0] dark:data-[type=standard]:border-[#005CF0] dark:hover:data-[type=standard]:border-[#005CF0]",["imagen","videofusion"].includes(t.category)&&"data-[type=premium]:border-[#005CF0] hover:data-[type=premium]:border-[#005CF0] dark:data-[type=premium]:border-[#005CF0] dark:hover:data-[type=premium]:border-[#005CF0]")),children:[e.jsx("span",{className:"absolute left-0 right-0 top-0 z-10 hidden -translate-y-1/2 items-center justify-center rounded-full bg-[#005CF0] data-[show=true]:inline-flex","data-show":t.type==="standard"||t.type==="premium"&&["imagen","videofusion"].includes(t.category),"data-category":t.category,children:e.jsx("span",{className:"absolute rounded-full bg-[#005CF0] px-[18px] text-[12px] leading-[22px] text-white",children:t.type==="standard"?"Popular":"Includes Everything"})}),e.jsxs("div",{className:"w-full",children:[e.jsx("h2",{className:"text-[20px] font-[600] tracking-tighter text-black dark:text-white",children:t.name}),e.jsx("p",{className:"text-sm font-[500] text-black/50 dark:text-white/50",children:s===!0&&t.category!=="enterprise"?`Use 10 Free API Calls then $${t.price}/month`:t.description})]}),e.jsxs("p",{className:"mt-2.5 gap-3 text-[32px] font-[700]",children:["$",s===!0&&t.category!=="enterprise"?"0":t.price,s===!0&&t.category!=="enterprise"&&e.jsx(e.Fragment,{children:e.jsxs("span",{className:"mx-2 line-through",children:["$",t.price]})}),e.jsx("span",{className:"text-sm",children:t.payment_mode=="subscription"?"/"+t.period:"for 10 days"})]}),e.jsxs("ul",{className:"flex w-full flex-col items-start text-[12px] font-[500] leading-[20px] text-[#005CF0]",children:[e.jsxs("li",{className:"flex items-center justify-start gap-1",children:[e.jsx("span",{children:e.jsx(m,{})}),e.jsxs("span",{children:[e.jsx("span",{className:"font-[700]",children:t.type==="premium"?"40%":"20%"})," ","cheaper"]})]}),e.jsxs("li",{className:"flex items-center justify-start gap-1",children:[e.jsx("span",{children:e.jsx(p,{})}),e.jsxs("span",{children:[e.jsx("span",{className:"font-[700]",children:"10% "}),"faster"]})]})]}),e.jsx("a",{href:route("subscribe",{id:t.id,product:t.category}),className:"bg-dark/10 flex w-full items-center justify-center rounded-[8px] border border-gray-300 px-7 py-3 text-[16px] font-[500] data-[focused]:outline-none hover:border-[#005CF0] focus:outline-none dark:border-[#EFF0F6]/50 dark:bg-white/10",children:t.payment_mode=="subscription"?s===!0&&t.category!=="enterprise"?"Start Free Trial":"Subscribe":"Purchase"}),e.jsxs("ul",{className:"flex flex-col gap-2 text-[18px] font-[500] text-black dark:text-white",children:[t.api_call_limit>0&&e.jsxs("li",{className:"flex items-start justify-start gap-2 first:text-video-fusion",children:[e.jsx(d,{className:"h-5 w-5 text-[#19C59D]"}),e.jsxs("span",{className:"text-[14px] font-[500] leading-[22px] text-[#19C59D]",children:[t.api_call_limit," ",o[t.category]]})]}),t.api_call_limit==0&&e.jsxs("li",{className:"flex items-start justify-start gap-2 first:text-video-fusion",children:[e.jsx(d,{className:"h-5 w-5 text-[#19C59D]"}),e.jsx("span",{className:"text-[14px] font-[500] leading-[22px] text-[#19C59D]",children:"Unlimited API Credits."})]}),t.category==="enterprise"&&["standard","premium","basic"].includes(t.type)&&e.jsxs("li",{className:"flex items-start justify-start gap-2 first:text-video-fusion",children:[e.jsx("span",{children:e.jsx(h,{className:"h-5 w-5 text-[#005CF0]"})}),e.jsx("span",{className:"inline-block text-[14px] font-[500] leading-[22px] text-[#005CF0]",children:"Hourly plan available to optimize high-traffic*"})]}),(t.list??[]).map((l,c)=>e.jsxs("li",{className:"flex items-start justify-start gap-2 first:text-video-fusion",children:[e.jsx("span",{className:"text-[16px] font-[500] text-black dark:text-white",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"currentColor"})})}),e.jsx("span",{className:"text-[14px] font-[500] leading-[22px] text-black dark:text-white",children:l})]},c))]})]})};export{b as P};
