import{j as n}from"./app-Bup04Qnx.js";import{u as m}from"./useFormBuilder-w_BHcgkC.js";import{F as l}from"./FormBuilder-B6qVpe84.js";import{u}from"./format-CisCU4Rs.js";import{h as d}from"./useFormChange-D35moWjQ.js";import"./Input-Bs1ncZB7.js";import"./BaseForm-wkPKZ5Eg.js";import"./Select-Cs0aMrtU.js";import"./index-CtjruoRR.js";import"./floating-ui.dom-CwWDmSD9.js";import"./TextArea-DiAj0IR8.js";import"./clsx-B-dksMZM.js";import"./index-Dy_g3AZ5.js";function i({isEdit:e=!1,formOptions:r={},BackButton:t=null}){const o=m({isEdit:e,getProperties:s,formOptions:r}),{data:a,setData:f}=o.form;return n.jsx(l,{...o,BackButton:t})}const s=e=>{const{props:r,data:t,setData:p}=e;return u(r.location),[[{form:"input",props:{name:"name",label:"Nama",type:"text"}},{form:"select",props:{name:"period_type",label:"Tipe Periode",options:r.period_types,prefix:"category.period_type"}},{form:"select",props:{name:"status",label:"Status",options:r.status,prefix:"category.status"}}],[{form:"select",props:{isReactSelect:!0,isVirtualized:!0,name:"parent_id",label:"Master Kategori",value:t.parent_id,options:r.parent_categories,handleChange:a=>d({e:a,name:"parent_id",...e}),bottomLabel:"Jika dikosongkan akan menjadi kategori level 1"}}]]},c=({children:e})=>e(s);i.PropertiesProvider=c;const M=i;export{M as default};
