import{j as s}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67155.js";import{r as h}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b6715.js";import{u as f}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67154.js";import{u as g}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b6715104.js";import{m as v}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671523.js";import{u as j}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b6715125.js";import{o as p,S as d,aU as N,p as b,r as w,I as z}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67157.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67153.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67152.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671526.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67159.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671510.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67158.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671520.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67156.js";function E({children:e,weight:l,size:t}){return s.jsxs("span",{className:"text-lg text-[var(--primary)]",style:{fontWeight:l,fontSize:t},children:[e," "]})}function m({titulo:e,descValue:l,maxValue:t,value:r,setValue:o}){return s.jsxs("div",{className:"w-full",children:[s.jsx("div",{children:s.jsx(E,{children:e})}),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:o,className:"range range-xs range-success",step:"1"})}),s.jsxs("span",{className:"whitespace-nowrap font-bold text-lg",children:[r," ",l]})]})]})}function L(){const{language:e}=f(),{close:l}=v(),{config:t,setConfig:r,initDisparo:o}=g(),{assinatura:i,setAssinatura:n}=j(),[c,u]=h.useState(!1),x=()=>{if(!c){z({type:"Error",message:e.envMassaTerms,position:"top-right"});return}o(),l()};return s.jsxs("div",{className:"w-[600px]",children:[s.jsx(p,{children:e.config_envio}),s.jsxs("div",{className:"w-full gap-3 mt-4 pb-4",children:[s.jsx(m,{titulo:e.intervalo,descValue:e.segundos,value:t.intervalo,setValue:a=>r("intervalo",a.target.value)}),s.jsx(m,{titulo:e.pausa_envios,descValue:e.contatos,maxValue:1e3,value:t.pausa,setValue:a=>r("pausa",a.target.value)}),s.jsx(m,{titulo:e.tempo_pausa,descValue:e.segundos,maxValue:500,value:t.tempoPausa,setValue:a=>r("tempoPausa",a.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:e.desativarAss}),s.jsx(d,{id:"desativarAss",estado:i.desativar,switchUpdate:a=>n("desativar",a.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:e.personalizarNomeAss}),s.jsx(d,{id:"persAss",estado:i.personalizar,switchUpdate:a=>n("personalizar",a.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:e.insiraNomeAss,value:i.nome,onChange:a=>n("nome",a.target.value),className:"grow"})]})]})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(p,{style:{fontSize:"14px"},children:e.envMassaTermoUso}),s.jsx(b,{children:e.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:e.envMassaIunderstand})]})})]}),s.jsx("div",{className:"flex justify-center pt-8",children:s.jsx(w,{name:e.enviar_campanha,funcao:x})})]})]})}export{L as default};
