<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 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.promo.PromoCardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/MaterialCardStyle">

  <org.chromium.ui.widget.ChromeImageButton
      android:id="@+id/promo_close_button"
      android:layout_width="@dimen/promo_close_button_size"
      android:layout_height="@dimen/promo_close_button_size"
      android:layout_gravity="top|end"
      android:background="?attr/selectableItemBackground"
      android:contentDescription="@string/close"
      android:scaleType="center"
      android:visibility="gone"
      android:src="@drawable/btn_close"
      app:tint="@macro/default_icon_color"/>

  <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="center_horizontal"
      android:orientation="vertical"
      android:paddingVertical="@dimen/promo_large_padding_vertical">

    <!-- Promo Illustration-->
    <ImageView
        android:id="@+id/promo_image"
        android:layout_width="match_parent"
        android:layout_height="@dimen/promo_large_image_size"
        android:layout_marginTop="@dimen/promo_large_illustration_margin"
        android:layout_marginBottom="@dimen/promo_large_illustration_margin"
        android:adjustViewBounds="true"
        android:layout_gravity="center"
        android:scaleType="fitCenter"
        android:importantForAccessibility="no"/>

    <!-- Promo body -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingHorizontal="@dimen/promo_large_padding_horizontal">

      <org.chromium.ui.widget.TextViewWithLeading
          android:id="@+id/promo_title"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="@dimen/promo_between_text_margin"
          android:gravity="center"
          android:textAppearance="@style/TextAppearance.TextLarge.Primary"
          app:leading="@dimen/text_size_large_leading"/>

      <org.chromium.ui.widget.TextViewWithLeading
          android:id="@+id/promo_description"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="@dimen/promo_large_text_group_bottom_margin"
          android:gravity="center"
          android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
          app:leading="@dimen/text_size_small_leading" />

      <org.chromium.ui.widget.ButtonCompat
          android:id="@+id/promo_primary_button"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:ellipsize="end"
          android:singleLine="true"
          style="@style/FilledButton" />
      <org.chromium.ui.widget.ButtonCompat
          android:id="@+id/promo_secondary_button"
          style="@style/TextButton"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:ellipsize="end"
          android:singleLine="true"/>

    </LinearLayout>
  </LinearLayout>
</org.chromium.components.browser_ui.widget.promo.PromoCardView>
