1import{z as s,P as R,B as e,a5 as T,a1 as M,C as n,J as r,bs as U}from"./vendor-react.488beb5a.js";import{au as W,B as o,d6 as E,s as b,ao as F,a8 as L,ai as P,bk as D,a1 as I,a$ as q,bX as O,af as H,bi as J,bT as $,bU as z,gq as K,bV as V,v as Y,gr as G,gs as X,bW as Q,d8 as Z,dM as ee,dL as te,I as ae}from"./index.50b229c8.js";import{i as ne}from"./vendor-lodash.d75192ae.js";import{A as se}from"./index.3735acdc.js";import{A as oe}from"./index.f6e05359.js";import{R as ie}from"./index.f037b372.js";import{M as re}from"./index.20ad44af.js";import{S as ce}from"./index.d5037f1a.js";import"./vendor-moment.b90c200c.js";import"./vendor-axios.3a665b0f.js";import"./index.5b20d664.js";import"./firebase.a2f303e6.js";import"./vendor-firebase.98cc6781.js";import"./wordingError.d1909b58.js";const v=a=>e.jsxs(e.Fragment,{children:[e.jsx(W,{}),e.jsx(le,{className:"desktop-wrapper",children:a.children})]}),le=s(o)` 2 padding: 0px 0px; 3 4 @media screen and (min-width: 1024px) { 5 padding: 50px 100px !important; 6 } 7 @media screen and (min-width: 1105px) { 8 padding: 50px 150px !important; 9 } 10`;v.propTypes={children:R.any};const ue={text:"Akun Anda Berhasil Dihapus",type:"SUCCESS",duration:5e3},de=()=>{var A;const a=T(),d=M(),[p,l]=n.useState(!1),[m,S]=n.useState(!1),[k,B]=n.useState(0),C=()=>l(!1),y=()=>S(!1),i=r(t=>t.auth.accountInformation),j=r(t=>t.auth.isDeleteAccount||null),x=r(t=>t.system.deviceType),f=r(({address:t})=>t==null?void 0:t.error),h=r(({user:t})=>(t==null?void 0:t.user)??{}),g=localStorage.getItem("@user"),N=[{name:"Data Diri",link:"/account"},{name:"Faktur Pajak",link:"/tax-input"},{name:"Ubah Kata Sandi",link:"/change-password"},{name:"Akun Sosial Saya",link:"/social-account"},{name:"Hapus Akun",onClick:()=>{l(!0)}},{name:"Keluar",link:"/",hideIcon:!0,customIcon:e.jsx(U,{size:23,color:"#709DFF"}),onClick:()=>{const t=JSON.parse(g);J.post("/authentication-service/public/logout",{userID:t.userID}).then(c=>{c.data&&(a($()),a(z()),a(K()),a(V()),a(Y()),a(G()),a(X()),Q(),localStorage.clear(),sessionStorage.clear(),window.location.href="/")})}}],u=[{title:"Biodata",menu:e.jsx(se,{deviceType:x}),index:0},{title:"Daftar Alamat",menu:e.jsx(oe,{}),index:1},{title:"Faktur Pajak",menu:e.jsx(ie,{}),index:2},{title:"Akun Sosial",menu:e.jsx(re,{deviceType:x}),index:3}],_=async()=>{const c={id:JSON.parse(g).userID,username:i.username,email:i.email,phoneNumber:i.phoneNumber,birth_date:i.birth_date,sim_expired_date:i.sim_expired_date,isSubscribeNewsletter:i.isSubscribeNewsletter,isValidate:!1},w=await Z(JSON.stringify(c),te);a(ee("customer-service/public/customer/personal/delete",w))};return n.useEffect(()=>{ne(g)?d.replace("/login"):a(E())},[]),n.useEffect(()=>{j&&(y(),b("@user"),b("@userInfo"),b("@is_social"),localStorage.clear(),sessionStorage.clear(),a(F(ue)),setTimeout(()=>{window.location.href="/"},5500))},[j]),n.useEffect(()=>{L(h)||P("@userInfo",h)},[h]),n.useEffect(()=>{f&&a(F({text:f,type:"FAILED"}))},[f]),e.jsxs(e.Fragment,{children:[e.jsx(D,{visible:p,icon:e.jsx(I,{icon:"check",height:20,width:20}),title:"Hapus Akun",description:"Apakah Anda yakin untuk menghapus akun? setelah akun dihapus, maka anda tidak akan dapat login lagi menggunakan akun ini",buttonSuccessText:"Ya",buttonFailedText:"Tidak",onCancel:C,btnCancelBorderColor:"#C2D5FF",btnCancelColor:"#616161",btnCancelBackgroundColor:"#FFFFFF",btnSubmitBackgroundColor:"#1AC788",onSubmit:t=>{S(!0),C()}}),e.jsx(D,{visible:m,icon:e.jsx(I,{icon:"check",height:20,width:20}),title:"Hapus Akun",description:"Apakah Anda benar-benar yakin akan menghapus akun ini?",buttonSuccessText:"Ya",buttonFailedText:"Tidak",onCancel:y,btnCancelBorderColor:"#C2D5FF",btnCancelColor:"#616161",btnCancelBackgroundColor:"#FFFFFF",btnSubmitBackgroundColor:"#1AC788",onSubmit:_}),x==="desktop"?e.jsxs(pe,{children:[e.jsx(me,{children:u==null?void 0:u.map((t,c)=>e.jsxs(xe,{onClick:()=>B(t==null?void 0:t.index),children:[e.jsx(o,{style:{marginBottom:"15px"},children:e.jsx(fe,{children:t==null?void 0:t.title})}),e.jsx(q,{height:5,style:{width:"70%",borderRadius:"12px"},color:(t==null?void 0:t.index)===k?"#2949C0":"#ffffff"})]},c))}),e.jsx(he,{children:(A=u[k])==null?void 0:A.menu})]}):e.jsx(O,{menus:N})]})},pe=s(o)` 11 margin-left: 20px; 12 box-shadow: 0px 0px 3.31px #afafaf; 13 border-radius: 12px; 14 display: flex; 15 flex-direction: column; 16 overflow: auto; 17`,me=s(o)` 18 border-bottom: 1px solid #afafaf; 19 display: flex; 20 justify-content: space-between; 21 width: 100%; 22 padding: 15px 0px 0px 0px; 23 cursor: pointer; 24`,xe=s(o)` 25 flex: 1; 26 display: flex; 27 align-items: center; 28 justify-content: center; 29 flex-direction: column; 30`,fe=s(H)` 31 font-size: 15px; 32 font-weight: bold; 33 color: #464646; 34`,he=s(o)` 35 flex-direction: column; 36 display: flex; 37 height: 100%; 38 overflow: auto; 39`,ge=()=>{const a=T(),d=M(),p=localStorage.getItem("@user"),l=r(m=>m.system.deviceType);return n.useEffect(()=>{p||d.replace("/login"),a(E()),a(ae())},[]),e.jsx(be,{flexDirection:"column",justifyContent:"space-between",deviceType:l,children:e.jsx(de,{})})},be=s(o)` 40 flex-grow: 1; 41 height: calc(100vh - 57.6px); 42 @media only screen and (min-width: 1024px) { 43 flex: ${a=>a.deviceType==="desktop"?4:""}; 44 } 45`,Be=()=>e.jsxs(v,{children:[e.jsx(ce,{}),e.jsx(ge,{})]});
45export{Be as default};
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.