import{j as t,Z as d,cA as l,a1 as p,I as g}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf10.js";import{u as C}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf19.js";import{u as x}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf36.js";import{c as u,a as f}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf92.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf47.js";import{E as h}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf117.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf18.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf6.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf8.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf4.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf5.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf7.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf23.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf9.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf2.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf3.js";function Z(){const{language:e}=C(),{model:o,category:r,setCategory:i}=u(),{addCategory:s,editCategory:n}=x(),{setActiveRenderCategoria:m}=f(),c=()=>{if(r.name.length<3){g({type:"Error",message:e.insertNameAtLeast3Chars,position:"top-right"});return}o==="create"?s(r):n(r),m("list")};return t.jsxs("div",{className:"p-2 overflow-hidden",children:[t.jsx("div",{className:"ml-9",children:t.jsx(d,{weight:"600",children:o==="edit"?e.editCategory:e.createCategory})}),t.jsxs("div",{className:"grid gap-4 pt-6",children:[t.jsx(h,{id:"Category_TextArea",titulo:e.insertName,type:"input",position:"bottom-end",placeholder:e.insertCategoryName,text:r.name,setText:a=>i("name",a)}),t.jsx(l,{colorInicial:o==="edit"?r.hexColor:null,title:e.pickColor,onChange:a=>i("hexColor",a)})]}),t.jsx("div",{className:"flex justify-center my-2",children:t.jsx(p,{name:o==="edit"?e.saveEdit:e.save,funcao:c})})]})}export{Z as default};
