<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<mozilla.components.browser.toolbar.display.DisplayToolbarView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:mozac="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="56dp"
    android:orientation="vertical">

    <!-- Navigation -->

    <mozilla.components.browser.toolbar.internal.ActionContainer
        android:id="@+id/mozac_browser_toolbar_navigation_actions"
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:layout_marginTop="4dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        mozac:actionContainerItemSize="48dp"
        tools:layout_width="48dp" />

    <!-- URL container -->

    <ImageView
        android:id="@+id/mozac_browser_toolbar_background"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        android:importantForAccessibility="no"
        app:layout_constraintEnd_toStartOf="@+id/mozac_browser_toolbar_browser_actions"
        app:layout_constraintStart_toEndOf="@+id/mozac_browser_toolbar_navigation_actions"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_goneMarginStart="8dp" />

    <!-- URL indicators (lock, tracking protection, ..) -->

    <ImageView
        android:id="@+id/mozac_browser_toolbar_empty_indicator"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        android:scaleType="center"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="@id/mozac_browser_toolbar_background"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/mozac_ic_search"
        tools:ignore="ContentDescription" />

    <mozilla.components.browser.toolbar.display.TrackingProtectionIconView
        android:id="@+id/mozac_browser_toolbar_tracking_protection_indicator"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        android:scaleType="center"
        android:visibility="gone"
        app:layout_constraintStart_toEndOf="@id/mozac_browser_toolbar_empty_indicator"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/mozac_ic_tracking_protection_on_no_trackers_blocked" />

    <ImageView
        android:id="@+id/mozac_browser_toolbar_separator"
        android:layout_width="@dimen/mozac_browser_toolbar_icons_separator_width"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        android:importantForAccessibility="no"
        android:scaleType="center"
        android:visibility="gone"
        app:layout_constraintStart_toEndOf="@+id/mozac_browser_toolbar_tracking_protection_indicator"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/mozac_browser_toolbar_icons_vertical_separator" />

    <mozilla.components.browser.toolbar.display.SiteSecurityIconView
        android:id="@+id/mozac_browser_toolbar_security_indicator"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        android:contentDescription="@string/mozac_browser_toolbar_content_description_site_info"
        android:scaleType="center"
        app:layout_constraintStart_toEndOf="@+id/mozac_browser_toolbar_separator"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/mozac_ic_site_security" />

    <mozilla.components.browser.toolbar.display.HighlightView
        android:id="@+id/mozac_browser_toolbar_permission_indicator"
        android:layout_width="10dp"
        android:layout_height="10dp"
        android:importantForAccessibility="no"
        app:layout_constraintBottom_toBottomOf="@+id/mozac_browser_toolbar_security_indicator"
        app:layout_constraintEnd_toEndOf="@+id/mozac_browser_toolbar_security_indicator"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="8dp"
        android:visibility="gone"
        android:tint="@color/photonBlue40"
        app:srcCompat="@drawable/mozac_dot_notification" />

    <!-- URL & Title -->

    <mozilla.components.browser.toolbar.display.OriginView
        android:id="@+id/mozac_browser_toolbar_origin_view"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toStartOf="@+id/mozac_browser_toolbar_page_actions"
        app:layout_constraintStart_toEndOf="@+id/mozac_browser_toolbar_security_indicator"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_goneMarginStart="8dp"
        app:layout_goneMarginTop="8dp" />

    <!-- Page actions -->

    <mozilla.components.browser.toolbar.internal.ActionContainer
        android:id="@+id/mozac_browser_toolbar_page_actions"
        android:layout_width="wrap_content"
        android:layout_height="40dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="@+id/mozac_browser_toolbar_background"
        app:layout_constraintTop_toTopOf="parent"
        mozac:actionContainerItemSize="40dp"
        tools:layout_width="48dp" />

    <!-- Browser Actions -->

    <mozilla.components.browser.toolbar.internal.ActionContainer
        android:id="@+id/mozac_browser_toolbar_browser_actions"
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:layout_marginTop="4dp"
        app:layout_constraintEnd_toStartOf="@id/mozac_browser_toolbar_menu"
        app:layout_constraintTop_toTopOf="parent"
        mozac:actionContainerItemSize="48dp"
        tools:layout_width="48dp" />

    <!-- Menu -->

    <mozilla.components.browser.menu.view.MenuButton
        android:id="@+id/mozac_browser_toolbar_menu"
        android:layout_width="36dp"
        android:layout_height="48dp"
        android:layout_marginTop="4dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <!-- Progress Bar -->

    <ProgressBar
        android:id="@+id/mozac_browser_toolbar_progress"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="0dp"
        android:layout_height="@dimen/mozac_browser_toolbar_progress_bar_height"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</mozilla.components.browser.toolbar.display.DisplayToolbarView>
