import{j as s}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0286.js";import{a as h}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0282.js";import{u as f}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0285.js";import{u as g}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b028110.js";import{k as v}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02821.js";import{u as j}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b028130.js";import{a as d,S as p,aU as N,b,c as w,I as k}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0288.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0284.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0283.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02836.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02820.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b028.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0287.js";function z({children:a,weight:l,size:t}){return s.jsxs("span",{className:"text-lg text-[var(--primary)]",style:{fontWeight:l,fontSize:t},children:[a," "]})}function m({titulo:a,descValue:l,maxValue:t,value:r,setValue:n}){return s.jsxs("div",{className:"w-full",children:[s.jsx("div",{children:s.jsx(z,{children:a})}),s.jsxs("div",{className:"flex gap-3 w-full items-center",children:[s.jsx("span",{className:"w-full",children:s.jsx("input",{type:"range",min:0,max:t,value:r,onChange:n,className:"range range-xs range-success",step:"1"})}),s.jsxs("span",{className:"whitespace-nowrap font-bold text-lg",children:[r," ",l]})]})]})}function R(){const{language:a}=f(),{close:l}=v(),{config:t,setConfig:r,initDisparo:n}=g(),{assinatura:i,setAssinatura:o}=j(),[c,u]=h.useState(!1),x=()=>{if(!c){k({type:"Error",message:a.envMassaTerms,position:"top-right"});return}n(),l()};return s.jsxs("div",{className:"w-[600px]",children:[s.jsx(d,{children:a.config_envio}),s.jsxs("div",{className:"w-full gap-3 mt-4 pb-4",children:[s.jsx(m,{titulo:a.intervalo,descValue:a.segundos,value:t.intervalo,setValue:e=>r("intervalo",e.target.value)}),s.jsx(m,{titulo:a.pausa_envios,descValue:a.contatos,maxValue:1e3,value:t.pausa,setValue:e=>r("pausa",e.target.value)}),s.jsx(m,{titulo:a.tempo_pausa,descValue:a.segundos,maxValue:500,value:t.tempoPausa,setValue:e=>r("tempoPausa",e.target.value)}),s.jsxs("div",{className:"flex flex-col gap-2 pt-5 pb-2",children:[s.jsxs("label",{className:"label !p-0 max-w-full",htmlFor:"desativarAss",children:[s.jsx("span",{className:"text-lg",children:a.desativarAss}),s.jsx(p,{id:"desativarAss",estado:i.desativar,switchUpdate:e=>o("desativar",e.target.checked),corPrimaria:!0,zoom:{zoom:"85%"}})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"label !p-0 max-w-full",htmlFor:"persAss",children:[s.jsx("span",{className:"text-lg",children:a.personalizarNomeAss}),s.jsx(p,{id:"persAss",estado:i.personalizar,switchUpdate:e=>o("personalizar",e.target.checked),corPrimaria:!0,zoom:{zoom:"85%"}})]}),i.personalizar&&s.jsxs("label",{className:"input input-bordered border border-solid input-sm flex items-center gap-2 w-full max-w-full mt-1",children:[s.jsx(N,{fill:"currentColor",className:"h-4 w-4 opacity-70"}),s.jsx("input",{type:"text",placeholder:a.insiraNomeAss,value:i.nome,onChange:e=>o("nome",e.target.value),className:"grow"})]})]})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(d,{style:{fontSize:"14px"},children:a.envMassaTermoUso}),s.jsx(b,{children:a.atencao_desc}),s.jsx("div",{className:"form-control",children:s.jsxs("label",{className:"cursor-pointer label justify-start gap-2 ",children:[s.jsx("input",{className:"checkbox border-[var(--secundaria)] [--chkbg:var(--primaria)] [--chkfg:white] checked:[var(--secundaria)]",type:"checkbox",checked:c,onChange:()=>u(!c)}),s.jsx("span",{className:"label-text font-semibold",children:a.envMassaIunderstand})]})})]}),s.jsx("div",{className:"flex justify-center pt-8",children:s.jsx(w,{name:a.enviar_campanha,funcao:x})})]})]})}export{R as default};
