<?xml version="1.0" encoding="utf-8"?>

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="16dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/image_view_event_image"
                android:layout_width="80dp"
                android:layout_height="80dp"
                android:layout_marginEnd="8dp"
                android:contentDescription="thumbnail"
                android:scaleType="centerCrop" />

            <TextView
                android:id="@+id/text_view_event_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"

                android:text="@string/event_placeholder"
                android:textAppearance="?attr/textAppearanceHeadline6" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/image_view_event_location"
                style="?android:attr/borderlessButtonStyle"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginEnd="8dp"
                android:background="?android:attr/selectableItemBackground"
                android:scaleType="centerCrop"
                android:src="@drawable/ic_map"
                app:tint="@color/material_on_surface_emphasis_high_type" />

            <TextView
                android:id="@+id/text_view_event_location"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/event_placeholder"
                android:textAppearance="?attr/textAppearanceBody1" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/image_view_event_time"
                style="?android:attr/borderlessButtonStyle"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginEnd="8dp"
                android:background="?android:attr/selectableItemBackground"
                android:clickable="false"
                android:src="@drawable/ic_schedule"
                app:tint="@color/material_on_surface_emphasis_high_type" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/text_view_event_start"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/event_placeholder"
                    android:textAppearance="?attr/textAppearanceBody2" />

                <TextView
                    android:id="@+id/text_view_event_end"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/event_placeholder"
                    android:textAppearance="?attr/textAppearanceBody2" />
            </LinearLayout>

        </LinearLayout>


        <TextView
            android:id="@+id/text_view_event_description"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="8dp"
            android:ellipsize="end"
            android:maxLines="5"
            android:text="@string/event_placeholder"
            android:textAppearance="?attr/textAppearanceBody2"
            android:textColor="?android:attr/textColorSecondary" />


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <Button
                android:id="@+id/button_add_to_calendar"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/button_add"
                android:textColor="@android:color/white"
                app:icon="@drawable/ic_event_available"
                app:iconGravity="textStart"
                app:iconTint="@android:color/white" />

            <ImageView
                android:id="@+id/image_view_share"
                style="?android:attr/borderlessButtonStyle"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginStart="16dp"
                android:background="?android:attr/selectableItemBackground"
                android:scaleType="centerCrop"
                android:src="@drawable/ic_share"
                app:tint="@color/material_on_surface_emphasis_high_type" />


        </LinearLayout>

    </LinearLayout>

</androidx.cardview.widget.CardView>