public void DeletePassport()
        {
            if (Items.Count == 0)
            {
                return;
            }

            ShellViewModel.ShowCustomMessageBox(
                AppResources.PassportDeleteConfirmation, AppResources.AppName,
                AppResources.Delete, AppResources.Cancel,
                dismissed =>
            {
                if (dismissed == CustomMessageBoxResult.RightButton)
                {
                    var items = new TLVector <TLSecureValueTypeBase>();
                    foreach (var item in Items)
                    {
                        items.Add(item.Type);
                    }
                    if (items.Count > 0)
                    {
                        MTProtoService.DeleteSecureValueAsync(
                            items,
                            result => BeginOnUIThread(() =>
                        {
                            IsWorking = false;

                            Items.Clear();
                        }),
                            error => BeginOnUIThread(() =>
                        {
                            IsWorking = false;
                        }));
                    }
                }
            });
        }
        public void Edit(TLSecureValue value)
        {
            if (value == null)
            {
                return;
            }

            if (PhoneNumberViewModel.IsValidType(value.Type))
            {
                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeletePhoneNumberAlert, AppResources.AppName,
                                                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),
                                                    dismissed =>
                {
                    if (dismissed == CustomMessageBoxResult.RightButton)
                    {
                        IsWorking = true;
                        MTProtoService.DeleteSecureValueAsync(new TLVector <TLSecureValueTypeBase> {
                            new TLSecureValueTypePhone()
                        },
                                                              result => Execute.BeginOnUIThread(() =>
                        {
                            IsWorking = false;

                            for (var i = 0; i < Items.Count; i++)
                            {
                                if (PhoneNumberViewModel.IsValidType(Items[i].Type))
                                {
                                    Items.RemoveAt(i--);
                                }
                            }
                        }),
                                                              error => Execute.BeginOnUIThread(() =>
                        {
                            IsWorking = false;
                        }));
                    }
                });
            }
            else if (EmailViewModel.IsValidType(value.Type))
            {
                ShellViewModel.ShowCustomMessageBox(AppResources.PassportDeleteEmailAlert, AppResources.AppName,
                                                    AppResources.Done.ToLowerInvariant(), AppResources.Cancel.ToLowerInvariant(),
                                                    dismissed =>
                {
                    if (dismissed == CustomMessageBoxResult.RightButton)
                    {
                        IsWorking = true;
                        MTProtoService.DeleteSecureValueAsync(new TLVector <TLSecureValueTypeBase> {
                            new TLSecureValueTypeEmail()
                        },
                                                              result => Execute.BeginOnUIThread(() =>
                        {
                            IsWorking = false;

                            for (var i = 0; i < Items.Count; i++)
                            {
                                if (EmailViewModel.IsValidType(Items[i].Type))
                                {
                                    Items.RemoveAt(i--);
                                }
                            }
                        }),
                                                              error => Execute.BeginOnUIThread(() =>
                        {
                            IsWorking = false;
                        }));
                    }
                });
            }
            else if (ResidentialAddressViewModel.IsValidType(value.Type))
            {
                StateService.SecureValue = value;
                StateService.Password    = _passwordBase;
                NavigationService.UriFor <ResidentialAddressViewModel>().Navigate();
            }
            else if (PersonalDetailsViewModel.IsValidType(value.Type))
            {
                StateService.SecureValue = value;
                StateService.Password    = _passwordBase;
                NavigationService.UriFor <PersonalDetailsViewModel>().Navigate();
            }
        }