import{j as m}from"./app-Bup04Qnx.js";import{u as l}from"./useFormBuilder-w_BHcgkC.js";import{F as u}from"./FormBuilder-B6qVpe84.js";import{u as c}from"./format-CisCU4Rs.js";import"./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:r=!1,formOptions:t={},BackButton:a=null}){const n=l({isEdit:r,getProperties:p,formOptions:t}),{data:e,setData:s}=n.form;return m.jsx(u,{...n,BackButton:a})}const p=r=>{const{props:t,data:a,setData:o}=r;return c(t.location),[[{form:"select",props:{name:"type",label:"Tipe",options:t.types,prefix:"user_bank.type",handleChange:e=>{var s;o({...a,type:(s=e==null?void 0:e.target)==null?void 0:s.value,user_id:null,company_id:null})}}}],[{form:"select",isHidden:a.type!="personal",props:{name:"user_id",label:"Pengguna",options:t.users,isReactSelect:!0,isVirtualized:!0,handleChange:e=>o("user_id",e==null?void 0:e.value)}},{form:"select",isHidden:a.type!="company",props:{name:"company_id",label:"Perusahaan",options:t.companies,isReactSelect:!0,isVirtualized:!0,handleChange:e=>o("company_id",e==null?void 0:e.value)}},{form:"select",props:{name:"bank_id",label:"Bank",options:t.banks,isReactSelect:!0,isVirtualized:!0,handleChange:e=>o("bank_id",e==null?void 0:e.value)}},{form:"input",props:{name:"branch",label:"Cabang",type:"text"}}],[{form:"input",props:{name:"account_number",label:"No. Rekening",type:"number"}},{form:"input",props:{name:"account_name",label:"Nama Rekening",type:"text"}}],[{form:"select",props:{name:"status",label:"Status",options:t.status,prefix:"user_bank.status"}}]]},d=({children:r})=>r(p);i.PropertiesProvider=d;const S=i;export{S as default};
