<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2019 Jeremy Jamet / Kunzisoft.

 This file is part of KeePassDX.

  KeePassDX is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  KeePassDX is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with KeePassDX.  If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	tools:targetApi="o"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:filterTouchesWhenObscured="true"
	android:orientation="vertical">

	<androidx.cardview.widget.CardView
		android:id="@+id/template_header_container"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		style="?attr/cardViewStyle">

		<FrameLayout
			android:layout_width="match_parent"
			android:layout_height="wrap_content">

			<View
				android:id="@+id/template_background_color"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_margin="9dp"
				android:layout_gravity="top|end"
				android:background="@drawable/background_rounded_square" />
			<View
				android:id="@+id/template_foreground_color"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_margin="32dp"
				android:layout_gravity="top|end"
				android:background="@drawable/background_rounded_square" />

			<ImageView
				android:id="@+id/template_background_color_button"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="top|end"
				android:layout_margin="3dp"
				android:src="@drawable/ic_color_background_white_24dp"
				android:contentDescription="@string/content_description_entry_background_color"
				style="@style/KeepassDXStyle.ImageButton.Simple.Mini" />
			<ImageView
				android:id="@+id/template_foreground_color_button"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="top|end"
				android:layout_margin="25dp"
				android:src="@drawable/ic_color_foreground_white_24dp"
				android:contentDescription="@string/content_description_entry_background_color"
				style="@style/KeepassDXStyle.ImageButton.Simple.Mini" />

			<LinearLayout
				android:orientation="vertical"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:layout_margin="@dimen/card_view_padding">

				<!-- Icon -->
				<androidx.appcompat.widget.AppCompatImageButton
					android:id="@+id/template_icon_button"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:elevation="8dp"
					android:layout_gravity="center_horizontal"
					android:src="@drawable/ic_blank_32dp"
					android:contentDescription="@string/content_description_entry_icon"/>

				<!-- Title -->
				<FrameLayout
					android:id="@+id/template_title_container"
					android:layout_width="match_parent"
					android:layout_height="wrap_content" />
			</LinearLayout>
		</FrameLayout>
	</androidx.cardview.widget.CardView>

	<LinearLayout
		android:id="@+id/template_fields_container"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:orientation="vertical" />

	<com.kunzisoft.keepass.view.SectionView
		android:id="@+id/not_referenced_fields_container"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		style="?attr/cardViewStyle"
		android:layout_marginBottom="@dimen/card_view_margin_vertical"/>

	<com.kunzisoft.keepass.view.SectionView
		android:id="@+id/custom_fields_container"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		style="?attr/cardViewStyle"/>

</LinearLayout>
