import{j as t}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f6.js";import{u as l}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f620.js";import{u as p}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f634.js";import{c,u as g}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f689.js";import{X as C,d4 as u,$ as x,I as f}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f611.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f645.js";import{E as h}from"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f6115.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f68.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f619.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f67.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f623.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f64.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f63.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f62.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f610.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f66.js";import"./v_7_4_3_4_e110faba-0ecf-462e-819c-68342bb684f69.js";function X(){const{language:e}=l(),{model:o,category:r,setCategory:a}=c(),{addCategory:s,editCategory:m}=p(),{setActiveRenderCategoria:n}=g(),d=()=>{if(r.name.length<3){f({type:"Error",message:e.insertNameAtLeast3Chars,position:"top-right"});return}o==="create"?s(r):m(r),n("list")};return t.jsxs("div",{className:"p-2 overflow-hidden",children:[t.jsx("div",{className:"ml-9",children:t.jsx(C,{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:i=>a("name",i)}),t.jsx(u,{colorInicial:o==="edit"?r.hexColor:null,title:e.pickColor,onChange:i=>a("hexColor",i)})]}),t.jsx("div",{className:"flex justify-center my-2",children:t.jsx(x,{name:o==="edit"?e.saveEdit:e.save,funcao:d})})]})}export{X as default};
