import{j as e}from"./app-BGey7YPf.js";import{I as l}from"./input-CGSIKYsG.js";import{T as h}from"./textarea-B31u9E-S.js";import{L as t}from"./label-BbSRpehS.js";import{I as j,a as u}from"./input-select-DHdS_tES.js";import{h as f}from"./has-role-XA1xdWi8.js";import{B as v}from"./button-submit-end-BkQSWpq2.js";import"./button-D5r5edT8.js";import"./index-BFyaOBDQ.js";import"./dialog-OAe1w9Cd.js";import"./x-C4WIHhXm.js";import"./search-CA9JuCC9.js";import"./index-CwO5dfCw.js";import"./separator-Di-l93J0.js";import"./chevron-down-DOZGaFlM.js";import"./save-Bm3_KHjE.js";function H({data:a,errors:n,processing:m,setData:s,storeData:o,reset:x,lembagasData:d}){const c=(d??[]).map(i=>({value:i.npsn,label:i.name}));return e.jsx("form",{onSubmit:o,encType:"multipart/form-data",children:e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[f(["super-admin"])&&e.jsxs("div",{children:[e.jsx(t,{htmlFor:"link_profile_npsn",children:"Lembaga"}),e.jsx(j,{options:c,value:a.link_profile_npsn||"",isDialog:!0,onValueChange:i=>{a.link_profile_npsn!==i&&s("link_profile_npsn",i)},clearable:!0,children:i=>e.jsx(u,{...i})}),e.jsx("p",{className:"text-red-500 text-xs",children:n.link_profile_npsn})]}),e.jsxs("div",{children:[e.jsx(t,{children:"Display name"}),e.jsx(l,{type:"text",name:"display_name",value:a.display_name,onChange:i=>s("display_name",i.target.value),placeholder:"Masukkan Display name"}),e.jsx("p",{className:"text-red-500 text-xs",children:n.display_name})]}),e.jsxs("div",{children:[e.jsx(t,{children:"THEME"}),e.jsx(l,{type:"text",name:"theme",value:a.theme,onChange:i=>s("theme",i.target.value),placeholder:"Masukkan THEME"}),e.jsx("p",{className:"text-red-500 text-xs",children:n.theme})]}),e.jsxs("div",{children:[e.jsx(t,{children:"Avatar"}),e.jsx(l,{type:"file",name:"avatar",onChange:i=>{var p;const r=(p=i.target.files)==null?void 0:p[0];r&&s("avatar",r)}}),e.jsx("p",{className:"text-red-500 text-xs",children:n.avatar})]}),e.jsxs("div",{children:[e.jsx(t,{children:"Bio"}),e.jsx(h,{name:"bio",value:a.bio,onChange:i=>s("bio",i.target.value)}),e.jsx("p",{className:"text-red-500 text-xs",children:n.bio})]}),e.jsx(v,{reset:x,processing:m})]})})}export{H as default};
