<?xml version="1.0" encoding="UTF-8" ?>
<pages:BaseContentPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:pages="clr-namespace:Bit.App.Pages"
    x:DataType="pages:AboutSettingsPageViewModel"
    xmlns:controls="clr-namespace:Bit.App.Controls"
    xmlns:u="clr-namespace:Bit.App.Utilities"
    xmlns:core="clr-namespace:Bit.Core"
    x:Class="Bit.App.Pages.AboutSettingsPage"
    Title="{u:I18n About}">
    
    <ContentPage.BindingContext>
        <pages:AboutSettingsPageViewModel />
    </ContentPage.BindingContext>

    <StackLayout>
        <controls:SwitchItemView
            Title="{u:I18n SubmitCrashLogs}"
            IsToggled="{Binding ShouldSubmitCrashLogs, Mode=TwoWay}"
            AutomationId="SubmitCrashLogsSwitch"
            StyleClass="settings-item-view"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <controls:ExternalLinkItemView
            Title="{u:I18n BitwardenHelpCenter}"
            GoToLinkCommand="{Binding GoToHelpCenterCommand}"
            StyleClass="settings-external-link-item"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <controls:ExternalLinkItemView
            Title="{u:I18n PrivacyPolicy}"
            GoToLinkCommand="{Binding GoToPrivacyPolicyCommand}"
            StyleClass="settings-external-link-item"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <controls:ExternalLinkItemView
            Title="{u:I18n WebVault}"
            GoToLinkCommand="{Binding GoToWebVaultCommand}"
            StyleClass="settings-external-link-item"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <controls:ExternalLinkItemView
            Title="{u:I18n LearnOrg}"
            GoToLinkCommand="{Binding GoToLearnAboutOrgsCommand}"
            StyleClass="settings-external-link-item"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <controls:ExternalLinkItemView
            Title="{u:I18n RateTheApp}"
            GoToLinkCommand="{Binding RateTheAppCommand}"
            StyleClass="settings-external-link-item"
            HorizontalOptions="FillAndExpand" />
        <BoxView StyleClass="box-row-separator" />

        <StackLayout
            Padding="16,12"
            Orientation="Horizontal">
            <controls:TruncatedMultilineCustomLabel
                Text="{Binding AppInfo}"
                MaxLines="10"
                StyleClass="box-footer-label"
                HorizontalOptions="StartAndExpand"
                LineBreakMode="TailTruncation" />

            <controls:IconLabel
                Text="{Binding Source={x:Static core:BitwardenIcons.Clone}}"
                TextColor="Black"
                HorizontalOptions="End"
                VerticalOptions="Center"
                SemanticProperties.Description="{u:I18n CopyAppInformation}">
                <controls:IconLabel.GestureRecognizers>
                    <TapGestureRecognizer Command="{Binding CopyAppInfoCommand}" />
                </controls:IconLabel.GestureRecognizers>
            </controls:IconLabel>

        </StackLayout>
    </StackLayout>
</pages:BaseContentPage>
