import{r as h,j as e}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b.js";import{u as j}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b20.js";import{u as v}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b32.js";import{a0 as f,Q as g,a2 as r}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b11.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b8.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b19.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b7.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b24.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b9.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b6.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b4.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b3.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b2.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b10.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b37.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b38.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b39.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b40.js";function M(){const{language:a}=j(),{automaticoBK:i,keys:n,createOrEditAttBk:s,setCreateOrEditAttBk:l,setActiveKey:o,saveAutomaticoBK:c,startCreateOrEditAtt:m,removeAutomaticoBK:d}=v();h.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(f,{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(g,{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};
