<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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/root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <com.anytypeio.anytype.core_ui.features.editor.decoration.EditorDecorationContainer
        android:id="@+id/decorationContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </com.anytypeio.anytype.core_ui.features.editor.decoration.EditorDecorationContainer>

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/bookmarkRoot"
        style="@style/BookmarkBlockStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/containerWithBackground"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/dp_16"
            android:paddingBottom="16dp">

            <ImageView
                android:id="@+id/bookmarkLogo"
                android:layout_width="16dp"
                android:layout_height="16dp"
                android:layout_marginStart="16dp"
                app:layout_constraintBottom_toBottomOf="@+id/bookmarkUrl"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@+id/bookmarkUrl"
                tools:visibility="visible" />

            <ImageView
                android:id="@+id/bookmarkImage"
                android:layout_width="82dp"
                android:layout_height="82dp"
                android:layout_marginEnd="16dp"
                android:foreground="@drawable/alpha_overlay_5"
                android:scaleType="centerCrop"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:scaleType="centerCrop"
                tools:src="@color/shape_tertiary" />

            <TextView
                android:id="@+id/bookmarkTitle"
                style="@style/TextView.ContentStyle.PreviewTitles.2.Medium"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="12dp"
                android:ellipsize="end"
                android:hint="@string/untitled"
                android:maxLines="2"
                android:textColor="@color/text_primary"
                android:textColorHint="@color/text_tertiary"
                app:layout_constraintBottom_toTopOf="@+id/bookmarkDescription"
                app:layout_constraintEnd_toStartOf="@+id/bookmarkImage"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_chainStyle="packed"
                app:layout_goneMarginEnd="@dimen/dp_16"
                tools:text="Octoverse spotlight: An analysis of developer productivity, work cadence, and collaboration in the early days of COVID-19"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/bookmarkDescription"
                style="@style/TextView.ContentStyle.Relations.3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="2dp"
                android:layout_marginEnd="12dp"
                android:ellipsize="end"
                android:maxLines="2"
                app:layout_constraintBottom_toTopOf="@+id/bookmarkUrl"
                app:layout_constraintEnd_toStartOf="@+id/bookmarkImage"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/bookmarkTitle"
                app:layout_goneMarginEnd="@dimen/dp_16"
                tools:text="We can both help with building an event from scratch, and join... We can both help with building an event from scratch"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/bookmarkUrl"
                style="@style/TextView.ContentStyle.Relations.3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="4dp"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="12dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="@color/text_secondary"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/bookmarkImage"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toEndOf="@+id/bookmarkLogo"
                app:layout_constraintTop_toBottomOf="@+id/bookmarkDescription"
                app:layout_goneMarginEnd="@dimen/dp_16"
                app:layout_goneMarginStart="16dp"
                tools:text="https://medium.com/s/story/The The Akari inst..." />

            <TextView
                android:id="@+id/loadBookmarkPictureError"
                style="@style/TextView.UXStyle.Captions.2.Regular"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginEnd="16dp"
                android:gravity="center"
                android:padding="8dp"
                android:text="@string/error_while_loading_picture"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="@+id/bookmarkImage"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:visibility="visible" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>

</FrameLayout>