import{r as e}from"./chunk-QTnfLwEv.js";import{n as t}from"./index-7yDgay5u.js";import{o as n,t as r}from"./jsx-runtime-DHSfUA5-.js";import{P as i,y as a}from"./test.id-DxQrYxPk.js";import{t as o}from"./diaryService-CNt2_Lb5.js";import{t as s}from"./navigationService-BNBSAd9W.js";import{t as c}from"./HeaderPage-CPQpvQQw.js";import{t as l}from"./TextInputRow-DqOYjq7o.js";var u=e(n(),1),d=r();function f(){let e=i(o),n=i(s),[r,f]=(0,u.useState)(``),p=r.trim().length>0;return(0,d.jsx)(c,{pageTestId:a.page,contentTestId:a.content,header:{title:t(`identity.create`,`New identity`),showBack:!0,right:{type:`button`,label:t(`common.save`,`Save`),disabled:!p,testId:a.save,onClick:()=>{p&&(e.addIdentity(r.trim()),n.navigate({path:`/identities`,replace:!0}))}}},children:(0,d.jsx)(l,{id:`identityName`,testId:a.nameInput,autoFocus:!0,placeholder:t(`identity.namePlaceholder`,`Enter a nickname`),value:r,onChange:f})})}export{f as IdentitiesNewPage};
//# sourceMappingURL=new-DX6Xi7tE.js.map