<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/signin_promo_view_wrapper"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/MaterialCardStyle">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:paddingBottom="12dp">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:layout_marginTop="4dp"
            android:layout_marginEnd="4dp">

            <ImageView
                android:id="@+id/sync_promo_image"
                android:layout_width="@dimen/sync_promo_account_image_size"
                android:layout_height="@dimen/sync_promo_account_image_size"
                android:layout_gravity="center"
                android:layout_marginTop="12dp"
                android:layout_marginBottom="12dp"
                android:importantForAccessibility="no"
                android:accessibilityTraversalAfter="@id/sync_promo_close_button"
                android:scaleType="fitCenter"/>

            <org.chromium.ui.widget.ChromeImageButton
                android:id="@+id/sync_promo_close_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="top|end"
                android:background="?attr/selectableItemBackground"
                android:scaleType="center"
                android:src="@drawable/btn_close"
                android:visibility="gone"
                android:accessibilityTraversalBefore="@id/sync_promo_image"
                app:tint="@macro/default_icon_color" />

        </FrameLayout>

        <TextView
              android:id="@+id/sync_promo_title"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginStart="16dp"
              android:layout_marginEnd="16dp"
              android:layout_marginBottom="12dp"
              android:gravity="center"
              android:lineSpacingMultiplier="1.25"
              android:textAppearance="@style/TextAppearance.TextLarge.Primary"
              android:includeFontPadding="false"
              tools:text="@string/signin_promo_title_recent_tabs"/>

        <TextView
            android:id="@+id/sync_promo_description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="12dp"
            android:gravity="center"
            android:lineSpacingMultiplier="1.25"
            android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
            android:includeFontPadding="false"
            tools:text="@string/signin_promo_description_recent_tabs"/>

        <org.chromium.ui.widget.ButtonCompat
            android:id="@+id/sync_promo_signin_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="@string/sync_promo_continue_as"
            android:foreground="@drawable/signin_promo_button_focus_ring"
            style="@style/FilledButton" />

        <org.chromium.ui.widget.ButtonCompat
            android:id="@+id/sync_promo_choose_account_button"
            style="@style/SigninButtonBorderlessRegular"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="@string/signin_promo_choose_account"/>

    </LinearLayout>

</org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow>
