import e from"./TopBar.c92e4bb0.js";import s from"./Container.f87d9f62.js";import i from"./Content.e22a1fd6.js";import n from"./Page.3927bdbf.js";import a from"./PageHeader.a5f457a5.js";import p from"./PageHeaderTitle.3ed783af.js";import m from"./PageBody.dec1fae1.js";import u from"./Button.f17dffc9.js";import c from"./List.d5d221b1.js";import f from"./ListItem.ee1e88fb.js";import l from"./StatusBubble.4f1d8322.js";import _ from"./NotificationBadge.b6fae3d5.js";import d from"./MainLayout.17290af6.js";import w from"./IconBox.e6c961ac.js";import y from"./IconGlobe.07030b80.js";import g from"./IconStorage.ef2b2e41.js";import b from"./Modal.a59fc373.js";import h from"./ModalContainer.51de3ea9.js";import v from"./FormInput.7debc7c5.js";import x from"./FormSelect.6e35ae7d.js";import S from"./FormActions.83ccca91.js";import C from"./SettingsSegment.e8fdfb41.js";import F from"./TwoFactorAuthentication.b51fcaa2.js";import{n as k}from"./plugin-vue2_normalizer.000ba15c.js";import"./TopBar.27b84f08.js";import"./Dropdown.d1060583.js";import"./DropdownList.02c48c2f.js";import"./DropdownListItem.ac31464c.js";import"./IconMoon.ade3e41b.js";import"./IconSun.8809e5d7.js";import"./IconSearch.27dac870.js";import"./IconButton.eadc8d3d.js";import"./Breadcrumbs.d39e2491.js";import"./BreadcrumbsItem.da3f8155.js";import"./TopBarTabBarContainer.3bdb2bb3.js";import"./TabBar.c1d45ed5.js";import"./TabBarItem.e9886f0a.js";import"./Confirm.888708f1.js";import"./Notification.d432029f.js";import"./IconDanger.2f6e115d.js";import"./IconWarning.ca92fb65.js";import"./IconSuccess.09b85716.js";import"./IconInfo.ad7662f9.js";import"./SearchPalette.282fdde5.js";import"./notification.db2f2ae7.js";import"./app.79e1f42d.js";import"./IconClose.edb7c8fd.js";import"./Form.2cdcadd9.js";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./ErrorText.b141a597.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";import"./Input.9d199ebb.js";const $={metaInfo(){return{title:`${this.__("Security")}`}},layout:d,components:{TwoFactorAuthentication:F,SettingsSegment:C,TopBar:e,Container:s,Content:i,Page:n,PageHeader:a,PageHeaderTitle:p,PageBody:m,Button:u,List:c,ListItem:f,StatusBubble:l,NotificationBadge:_,IconBox:w,IconGlobe:y,IconStorage:g,Modal:b,ModalContainer:h,FormInput:v,FormSelect:x,FormActions:S},props:{profile:Object,languages:Array,twoFactor:Object},data(){return{form:{current_password:null,password:null,password_confirmation:null},breadcrumbs:[{title:this.$page.props.settings.name,to:"/"},{title:this.__("Profile"),to:this.route("profile.index")},{title:this.__("Security"),to:this.route("profile.security.index")}]}},methods:{submit(){this.$inertia.patch(this.route("profile.security.updatePassword"),this.form,{onStart:()=>this.sending=!0,onFinish:()=>{this.sending=!1,Object.keys(this.$page.props.errors).length||(this.form={current_password:null,password:null,password_confirmation:null})}})}}};var B=function(){var r=this,o=r._self._c;return o("Page",[o("TopBar",{attrs:{breadcrumbs:r.breadcrumbs}}),o("Content",[o("Container",[o("PageBody",[o("SettingsSegment",{scopedSlots:r._u([{key:"title",fn:function(){return[r._v(" "+r._s(r.__("Password"))+" ")]},proxy:!0},{key:"subtitle",fn:function(){return[r._v(" "+r._s(r.__("Change your password"))+" ")]},proxy:!0},{key:"form",fn:function(){return[o("form",{staticClass:"space-y-4",on:{submit:function(t){return t.preventDefault(),r.submit.apply(null,arguments)}}},[o("FormInput",{attrs:{label:r.__("Current password"),type:"password",errors:r.$page.props.errors.current_password},model:{value:r.form.current_password,callback:function(t){r.$set(r.form,"current_password",t)},expression:"form.current_password"}}),o("div",{staticClass:"w-full flex space-x-4"},[o("FormInput",{staticClass:"w-1/2",attrs:{label:r.__("New password"),type:"password",errors:r.$page.props.errors.password},model:{value:r.form.password,callback:function(t){r.$set(r.form,"password",t)},expression:"form.password"}}),o("FormInput",{staticClass:"w-1/2",attrs:{label:r.__("Confirm new password"),type:"password",errors:r.$page.props.errors.password_confirmation},model:{value:r.form.password_confirmation,callback:function(t){r.$set(r.form,"password_confirmation",t)},expression:"form.password_confirmation"}})],1),o("FormActions",[o("Button",[r._v(r._s(r.__("Save")))])],1)],1)]},proxy:!0}])}),o("SettingsSegment",{scopedSlots:r._u([{key:"title",fn:function(){return[r._v(" "+r._s(r.__("Two-factor authentication"))+" ")]},proxy:!0},{key:"subtitle",fn:function(){return[r._v(" "+r._s(r.__("Manage two-factor authentication for your account."))+" ")]},proxy:!0},{key:"content",fn:function(){return[o("TwoFactorAuthentication",{attrs:{secret:r.twoFactor.secret,recoveryCodes:r.twoFactor.recoveryCodes,enabled:r.twoFactor.enabled}})]},proxy:!0}])})],1)],1)],1)],1)},I=[],P=k($,B,I,!1,null,null,null,null);const Mr=P.exports;export{Mr as default};
