1import{J as d,X as m,C as f,c as n,o as r,d as e,G as u,f as h,E as y,n as l,t as p,w as _,v as w}from"./vue-vendor-zXpxZbJ5.js";import{c as v}from"./chainQueryStatus-DnfBDyw2.js";import{B as g}from"./BigWaitState-lMVGwsFL.js";import{_ as N}from"./index-R1D5dzOa.js";import"./WaitState-ClTu_dMl.js";import"./utils-BTpTYCxF.js";import"./datetime-Dr26p2qm.js";const P={name:"NewProfile",components:{BigWaitState:g},mixins:[v],async mounted(){this.getProfileTypes()},methods:{...m("profiles",["getProfileTypes","createNewProfile"]),async handleCreateNewProfile(){if(this.name==""){this.$store.dispatch("notifications/addNotification",{type:"error",appearance:"popover",message:"Please enter a name for this profile."});return}this.waiting=!0;try{const i=await this.createNewProfile({profile:{name:this.name,type_id:this.profileType.id}});this.$router.push({name:"profiles-edit",params:{profileId:i.id},query:{scope:"create"}})}catch{this.$store.dispatch("notifications/addNotification",{type:"error",appearance:"popover",message:"An error occurred. Please try again."}),this.waiting=!1}}},computed:{...d("profiles",["profileTypes"]),profileType(){let i=this.$route.query.type||"individual";return this.profileTypes.find(t=>t.key==i)}},data(){return{waiting:!1,name:""}}},T={class:"container mx-auto"},x={class:"my-12 md:my-24"},b={key:1,lsi:""},C={class:"row"},k={class:"col-xs-offset-0 col-xs-12 col-sm-offset-1 col-sm-10 col-md-offset-1 col-md-10"},q=["value"],B={class:"questionnaire"},S={class:"questionnaire-header questionnaire-header-plain"},V={class:"questionnaire-title"},A={class:"profile-name-wrapper"},D={class:"profile-name"},E={class:"profile-name-footer"};function M(i,t,Q,z,o,s){const c=f("big-wait-state");return r(),n("div",T,[e("div",x,[i.waitingOnChainQuery?(r(),u(c,{key:0})):(r(),n("div",b,[e("div",C,[e("div",k,[e("form",{onSubmit:t[1]||(t[1]=h((...a)=>s.handleCreateNewProfile&&s.handleCreateNewProfile(...a),["prevent"]))},[e("input",{type:"hidden",name:"type_id",value:s.profileType.id},null,8,q),e("div",B,[e("div",S,[e("h3",V,[e("i",{class:l(["fa",s.profileType.icon])},null,2),y(" New "+p(s.profileType.name)+" Profile ",1)])]),e("div",A,[t[2]||(t[2]=e("h4",{class:"t-weight-normal"}," First, enter a name for this profile so that you can easily identify it. ",-1)),e("div",D,[_(e("input",{class:"custom custom-lg form-control",type:"text","data-testid":"new-profile-name","onUpdate:modelValue":t[0]||(t[0]=a=>o.name=a)},null,512),[[w,o.name]])]),e("div",E,[e("button",{type:"submit",class:l(["c-btn c-btn--medium c-btn--orange",{"opacity-75 pointer-events-none":o.waiting}])},p(o.waiting?"Please wait":"Save & Continue"),3)])])])],32)])])]))])])}const W=N(P,[["render",M]]);export{W as default}; 2//# sourceMappingURL=New-Dc9XrIIb.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.