import{j as e,a2 as h,X as j,a4 as r}from"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f10.js";import{a as v}from"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f4.js";import{u as f}from"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f19.js";import{u as g}from"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f31.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f18.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f6.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f8.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f5.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f7.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f23.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f9.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f2.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f3.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f36.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f37.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f38.js";import"./v_7_4_2_15_728248e3-b235-44ed-9cd5-d3199fba8c4f39.js";function M(){const{language:a}=f(),{automaticoBK:i,keys:n,createOrEditAttBk:s,setCreateOrEditAttBk:l,setActiveKey:o,saveAutomaticoBK:c,startCreateOrEditAtt:m,removeAutomaticoBK:d}=g();v.useEffect(()=>(m(),()=>{l({date:"",time:"",recurrency:"",items:[]})}),[]);const u=e.jsxs("div",{className:"form-control w-full",children:[e.jsx("label",{className:"label",children:e.jsx("span",{className:"label-text",children:a.agendamento_recorrencia})}),e.jsxs("select",{className:"!py-0 select select-bordered !select-sm w-full",onChange:t=>l({...s,recurrency:t.target.value}),value:s.recurrency,children:[e.jsx("option",{value:"",children:a.noneSelected}),e.jsx("option",{value:"diario",children:a.diario}),e.jsx("option",{value:"semanal",children:a.semanal}),e.jsx("option",{value:"mensal",children:a.mensal}),e.jsx("option",{value:"trimestral",children:a.trimestral}),e.jsx("option",{value:"semestral",children:a.semestral}),e.jsx("option",{value:"anual",children:a.anual})]})]}),p=e.jsxs("div",{className:"flex justify-between gap-6",children:[e.jsxs("div",{className:"form-control w-full max-w-xs",children:[e.jsx("label",{className:"label",children:e.jsx("span",{className:"label-text",children:a.agendamento_table_data})}),e.jsx("input",{type:"Date",className:"input input-bordered w-full max-w-xs input-sm",value:s.date,onChange:t=>l({...s,date:t.target.value}),min:new Date().toISOString().split("T")[0]})]}),e.jsxs("div",{className:"form-control w-full max-w-xs",children:[e.jsx("label",{className:"label",children:e.jsx("span",{className:"label-text",children:a.agendamento_table_hora})}),e.jsx("input",{type:"time",className:"input input-bordered w-full max-w-xs input-sm cursor-pointer",value:s.time,onChange:t=>l({...s,time:t.target.value})})]})]}),x=n.map(t=>e.jsx("div",{children:e.jsx("label",{htmlFor:t.tag,children:e.jsxs("div",{className:"flex justify-between cursor-pointer items-center hover:bg-[var(--dropdown-background-hover)] h-9 px-1 py-2 rounded",children:[e.jsxs("div",{className:"flex align-center items-center m-2",children:[e.jsx("span",{className:"mr-2",children:t.icon}),e.jsx("span",{children:a[t.nome]})]}),e.jsx("div",{className:"pulse",children:e.jsx(h,{id:t.tag,switchUpdate:()=>o(t.tag,!t.checked),estado:t.checked})})]})})},t.tag));return e.jsxs("div",{className:"grid gap-5 min-w-[500px]",children:[e.jsxs(j,{children:[" ",a.modalTitle," "]}),e.jsx("div",{className:"flex flex-col gap-2 overflow-x-auto",style:{maxHeight:"calc(100vh - 300px)"},children:x}),p,u,e.jsxs("div",{className:"flex justify-between",children:[i.date.length>0&&e.jsx(r,{name:a.removeAutoBackup,funcao:d}),e.jsx(r,{name:a.save,funcao:c})]})]})}export{M as default};
