<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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.modules.schoolandteachers.school.SchoolFragment">

    <com.google.android.material.progressindicator.CircularProgressIndicator
        android:id="@+id/schoolProgress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true" />

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/schoolSwipe"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/schoolContent"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingVertical="8dp"
            android:paddingStart="8dp"
            android:paddingEnd="12dp"
            android:visibility="invisible"
            tools:visibility="visible">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingStart="12dp"
                android:paddingLeft="12dp"
                android:paddingTop="8dp"
                android:paddingEnd="12dp"
                android:paddingRight="12dp"
                android:paddingBottom="8dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/school_name"
                    android:textColor="?android:textColorSecondary"
                    android:textSize="12sp" />

                <TextView
                    android:id="@+id/schoolName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textIsSelectable="true"
                    android:textSize="17sp"
                    tools:text="@tools:sample/full_names" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    android:paddingStart="12dp"
                    android:paddingLeft="12dp"
                    android:paddingTop="7dp"
                    android:paddingEnd="12dp"
                    android:paddingRight="12dp"
                    android:paddingBottom="7dp">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/school_address"
                        android:textColor="?android:textColorSecondary"
                        android:textSize="12sp" />

                    <TextView
                        android:id="@+id/schoolAddress"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textIsSelectable="true"
                        android:textSize="17sp"
                        tools:text="@tools:sample/full_names" />
                </LinearLayout>

                <ImageButton
                    android:id="@+id/schoolAddressButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginRight="8dp"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:contentDescription="@string/school_address_button"
                    android:padding="4dp"
                    app:srcCompat="@drawable/ic_school_directions"
                    app:tint="?colorPrimary" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    android:paddingStart="12dp"
                    android:paddingLeft="12dp"
                    android:paddingTop="7dp"
                    android:paddingEnd="12dp"
                    android:paddingRight="12dp"
                    android:paddingBottom="7dp">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/school_telephone"
                        android:textColor="?android:textColorSecondary"
                        android:textSize="12sp" />

                    <TextView
                        android:id="@+id/schoolTelephone"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textIsSelectable="true"
                        android:textSize="17sp"
                        tools:text="@tools:sample/full_names" />
                </LinearLayout>

                <ImageButton
                    android:id="@+id/schoolTelephoneButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginRight="8dp"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:contentDescription="@string/school_telephone_button"
                    android:padding="4dp"
                    app:srcCompat="@drawable/ic_all_phone"
                    app:tint="?colorPrimary" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingStart="12dp"
                android:paddingLeft="12dp"
                android:paddingTop="7dp"
                android:paddingEnd="12dp"
                android:paddingRight="12dp"
                android:paddingBottom="7dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/school_headmaster"
                    android:textColor="?android:textColorSecondary"
                    android:textSize="12sp" />

                <TextView
                    android:id="@+id/schoolHeadmaster"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textIsSelectable="true"
                    android:textSize="17sp"
                    tools:text="@tools:sample/full_names" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingStart="12dp"
                android:paddingLeft="12dp"
                android:paddingTop="7dp"
                android:paddingEnd="12dp"
                android:paddingRight="12dp"
                android:paddingBottom="7dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/school_pedagogue"
                    android:textColor="?android:textColorSecondary"
                    android:textSize="12sp" />

                <TextView
                    android:id="@+id/schoolPedagogue"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textIsSelectable="true"
                    android:textSize="17sp"
                    tools:text="@tools:sample/full_names" />
            </LinearLayout>
        </LinearLayout>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

    <LinearLayout
        android:id="@+id/schoolEmpty"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:padding="10dp"
        android:visibility="gone"
        tools:ignore="UseCompoundDrawables">

        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            app:srcCompat="@drawable/ic_more_schoolandteachers"
            app:tint="?colorOnBackground"
            tools:ignore="contentDescription" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:gravity="center"
            android:text="@string/school_no_info"
            android:textSize="20sp" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/schoolError"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="invisible"
        tools:ignore="UseCompoundDrawables"
        tools:visibility="invisible">

        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            app:srcCompat="@drawable/ic_error"
            app:tint="?colorOnBackground"
            tools:ignore="contentDescription" />

        <TextView
            android:id="@+id/schoolErrorMessage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:gravity="center"
            android:padding="8dp"
            android:text="@string/error_unknown"
            android:textSize="20sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:gravity="center"
            android:orientation="horizontal">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/schoolErrorDetails"
                style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:text="@string/all_details" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/schoolErrorRetry"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/all_retry" />
        </LinearLayout>
    </LinearLayout>
</FrameLayout>
