(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[907],{3638:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,6874,23)),Promise.resolve().then(a.bind(a,7297))},7297:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var r=a(5155),s=a(2115),l=a(9799);let n=s.forwardRef(function(e,t){let{title:a,titleId:r,...l}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},l),a?s.createElement("title",{id:r},a):null,s.createElement("path",{d:"M9.375 3a1.875 1.875 0 0 0 0 3.75h1.875v4.5H3.375A1.875 1.875 0 0 1 1.5 9.375v-.75c0-1.036.84-1.875 1.875-1.875h3.193A3.375 3.375 0 0 1 12 2.753a3.375 3.375 0 0 1 5.432 3.997h3.943c1.035 0 1.875.84 1.875 1.875v.75c0 1.036-.84 1.875-1.875 1.875H12.75v-4.5h1.875a1.875 1.875 0 1 0-1.875-1.875V6.75h-1.5V4.875C11.25 3.839 10.41 3 9.375 3ZM11.25 12.75H3v6.75a2.25 2.25 0 0 0 2.25 2.25h6v-9ZM12.75 12.75v9h6.75a2.25 2.25 0 0 0 2.25-2.25v-6.75h-9Z"}))}),i=s.forwardRef(function(e,t){let{title:a,titleId:r,...l}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},l),a?s.createElement("title",{id:r},a):null,s.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});var o=a(6874),c=a.n(o);let d={active:!1,firstMonthPrice:19.99},m=e=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),x=()=>{let[e,t]=(0,s.useState)("Anual"),[a,o]=(0,s.useState)([]),[x,h]=(0,s.useState)(!0),[u,p]=(0,s.useState)(null);if((0,s.useEffect)(()=>{(async()=>{try{let e=await fetch("https://app.justiplus.com.br/server/api/planos");if(!e.ok)throw Error("Erro ao buscar os dados da API.");let t=await e.json();o(t)}catch(e){p(e.message)}finally{h(!1)}})()},[]),x)return(0,r.jsx)("p",{className:"text-center text-black dark:text-white",children:"Carregando planos..."});if(u)return(0,r.jsxs)("p",{className:"text-center text-red-500",children:["Erro: ",u]});let g=[a.find(e=>"Essential"===e.nome),a.find(e=>"Evolution"===e.nome),a.find(e=>"Pro"===e.nome),a.find(e=>"Elite"===e.nome)].filter(Boolean),f=d.active&&d.firstMonthPrice>0;return(0,r.jsx)("section",{id:"pricing",className:"bg-white py-16 dark:bg-gray-900 md:py-20 lg:py-28",children:(0,r.jsxs)("div",{className:"container mx-auto px-4",children:[(0,r.jsx)(l.A,{title:"Planos que acompanham a evolu\xe7\xe3o da sua advocacia",paragraph:"Experimente gratuitamente por 7 dias. Cancele a qualquer momento.",center:!0,mb:"50px",width:"670px"}),(0,r.jsx)("div",{className:"mb-8 flex justify-center",children:(0,r.jsxs)("div",{className:"flex space-x-2 rounded-full bg-gray-200 p-1 shadow-inner dark:bg-gray-800",children:[(0,r.jsx)("button",{onClick:()=>t("Mensal"),className:"px-4 py-2 rounded-full font-semibold transition-colors duration-300 ".concat("Mensal"===e?"colorPrimary text-white shadow-md":"text-gray-700 hover:bg-gray-300 dark:text-gray-300 dark:hover:bg-gray-700"),children:"Mensal"}),(0,r.jsx)("button",{onClick:()=>t("Anual"),className:"px-4 py-2 rounded-full font-semibold transition-colors duration-300 ".concat("Anual"===e?"colorPrimary text-white shadow-md":"text-gray-700 hover:bg-gray-300 dark:text-gray-300 dark:hover:bg-gray-700"),children:"Anual"})]})}),(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(260px,1fr))] justify-items-center gap-8",children:g.map(t=>{let a=parseFloat(t.valor)||0,s="Anual"===e?.85*a:a,l=f&&s>d.firstMonthPrice,o=l?Math.round((1-d.firstMonthPrice/s)*100):0;return(0,r.jsxs)("div",{className:"relative flex w-full max-w-[500px] flex-col items-start rounded-xl border border-gray-100 bg-white p-8 shadow-2xl transition-transform duration-300 hover:-translate-y-1 dark:border-gray-700 dark:bg-gray-800",children:["Evolution"===t.nome&&(0,r.jsx)("span",{className:"colorPrimary absolute right-0 top-0 mt-4 mr-4 rounded-full px-4 py-1.5 text-xs font-bold uppercase tracking-wider text-white",children:"MAIS VENDIDO"}),f&&l&&(0,r.jsxs)("div",{className:"mb-2 inline-flex items-center gap-1 rounded-full bg-yellow-50 px-2 py-1 text-[11px] font-semibold text-yellow-700",children:[(0,r.jsx)(n,{className:"h-3 w-3"}),(0,r.jsxs)("span",{children:[o,"% OFF"]})]}),(0,r.jsx)("h3",{className:"mt-2 mb-2 text-2xl font-bold text-gray-800 dark:text-white",children:t.nome}),(0,r.jsx)("div",{className:"mb-2",children:f&&l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:["De"," ",(0,r.jsx)("span",{className:"line-through",children:m(s)})," ","por"]}),(0,r.jsx)("p",{className:"text-4xl font-extrabold text-gray-900 dark:text-white",children:m(d.firstMonthPrice)}),(0,r.jsx)("p",{className:"text-xs font-medium text-gray-500",children:"*no primeiro m\xeas"}),"Anual"===e?(0,r.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["+ 11x de"," ",(0,r.jsx)("span",{className:"font-semibold",children:m(s)}),"."]}):(0,r.jsx)(r.Fragment,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-baseline text-gray-900 dark:text-white",children:[(0,r.jsxs)("span",{className:"mr-1 text-2xl font-bold",children:["R$ ",(t=>{let a,r=parseFloat(t.valor)||0;return a="Anual"===e?.85*r:r,new Intl.NumberFormat("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2}).format(a)})(t)]}),(0,r.jsx)("span",{className:"text-base font-normal text-gray-500",children:"/m\xeas"})]}),"Mensal"!==e&&(0,r.jsxs)("p",{className:"mb-1 text-sm text-green-800",children:["Economize ",(0,r.jsxs)("strong",{children:["R$ ",(t=>{let a=parseFloat(t.valor)||0,r=0,s=0;return"Anual"===e?s=(r=12*a)-.85*r:r=a,new Intl.NumberFormat("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2}).format(s)})(t)]})]})]})}),(0,r.jsx)("ul",{className:"flex-grow w-full space-y-2 text-sm text-gray-700 dark:text-gray-300",children:t.descricao.split(",").map((e,t)=>(0,r.jsxs)("li",{className:"flex items-start",children:[(0,r.jsx)(i,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0 text-green-500"}),(0,r.jsx)("span",{className:"leading-snug",children:e.trim()})]},t))}),(0,r.jsx)(c(),{id:"comecar-gratis-planos",href:"/begin",className:"mt-8 w-full rounded-full py-3 px-8 text-center text-[18px] font-bold text-white shadow-lg colorPrimary transition-colors duration-300",children:"Experimentar gr\xe1tis"})]},t.id)})})]})})}},9799:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(5155);let s=e=>{let{title:t,paragraph:a,paragraph2:s,width:l="570px",center:n,mb:i="100px"}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"w-full ".concat(n?"mx-auto text-center":""),style:{maxWidth:l,marginBottom:i},children:[(0,r.jsx)("h2",{className:"mb-4 text-3xl font-bold leading-tight! text-black dark:text-white sm:text-4xl md:text-[45px]",children:t}),(0,r.jsx)("p",{className:"text-base leading-relaxed! text-body-color md:text-lg",children:a}),s&&(0,r.jsx)("p",{className:"mt-4 text-base leading-relaxed! text-body-color md:text-lg",children:s})]})})}}},e=>{e.O(0,[874,441,964,358],()=>e(e.s=3638)),_N_E=e.O()}]);