<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ F7cloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2024 Julius Linus <juliuslinus1@gmail.com>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
  -->
<LinearLayout 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:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/voice_preview_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/standard_margin"
        android:layout_marginTop="@dimen/standard_margin"
        android:background="@drawable/shape_grouped_outcoming_message"
        android:gravity="center"
        android:orientation="horizontal"
        android:visibility="gone"
        tools:backgroundTint="@color/nc_grey"
        tools:visibility="visible">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/playPauseBtn"
            style="@style/Widget.AppTheme.Button.IconButton"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginStart="@dimen/standard_margin"
            android:contentDescription="@string/play_pause_voice_message"
            app:cornerRadius="@dimen/button_corner_radius"
            app:icon="@drawable/ic_baseline_play_arrow_voice_message_24"
            app:iconSize="30dp"
            app:iconTint="@color/high_emphasis_text"
            app:rippleColor="#1FFFFFFF" />

        <SeekBar
            android:id="@+id/seekbar"
            style="@style/F7cloud.Material.Outgoing.SeekBar"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginEnd="@dimen/standard_margin"
            android:thumb="@drawable/voice_message_outgoing_seek_bar_slider"
            tools:progress="50"
            tools:progressBackgroundTint="@color/blue"
            tools:progressTint="@color/hwSecurityRed" />

    </LinearLayout>

    <Chronometer
        android:id="@+id/audioRecordDuration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/bg_default"
        android:paddingStart="5dp"
        android:paddingEnd="5dp"
        android:textColor="@color/low_emphasis_text"
        android:textSize="16sp"
        android:textStyle="bold" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal"
        android:weightSum="3">

        <ImageView
            android:id="@+id/deleteVoiceRecording"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginVertical="@dimen/standard_margin"
            android:layout_weight="1"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/delete_voice_recording"
            android:scaleType="centerInside"
            android:src="@drawable/ic_delete" />

        <ru.f7cloud.talk.ui.MicInputCloud
            android:id="@+id/micInputCloud"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            app:pauseIcon="@drawable/baseline_stop_24"
            app:playIcon="@drawable/ic_refresh" />

        <ImageView
            android:id="@+id/sendVoiceRecording"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginVertical="@dimen/standard_margin"
            android:layout_weight="1"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/nc_send_voice_recording"
            android:scaleType="centerInside"
            android:src="@drawable/ic_send" />
    </LinearLayout>

</LinearLayout>
