import{api as a}from"./common-DEIQtiPI.js";import"./index-DOFLUERq.js";const n=[{fieldname:"pg_type",handler:async e=>{if(e.value)try{const t=(await a.call("jingrow.handler.run_pg_method",{pgs:JSON.stringify({pagetype:"Customize Form",name:"Customize Form",pg_type:e.value}),method:"fetch_to_customize"}))?.pgs?.[0];t&&(Object.keys(t).forEach(r=>{e.record[r]=t[r]}),window.dispatchEvent(new CustomEvent("switch-active-tab",{detail:"form_tab"})))}catch(o){console.error("[Customize Form] fetch_to_customize failed:",o)}}}];export{n as default};
