@php($title = 'Настройки темы')
@extends('layouts.admin')
@section('content')
    <form method="post" action="{{ route('admin.design.update') }}" enctype="multipart/form-data">
        @csrf
        <h5 class="mt-3">Основное</h5>
        <div class="d-flex gap-3">
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="page_color" class="form-label m-0">Цвет страницы</label>
                <input type="color" class="form-control form-control-color" id="page_color" name="page_color"
                    value="{{ ($parameters['page_color'] ?? '') }}">
            </div>
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="text_color" class="form-label m-0">Цвет основного текста</label>
                <input type="color" class="form-control form-control-color" id="text_color" name="text_color"
                    value="{{ ($parameters['text_color'] ?? '') }}">
            </div>
        </div>
        <div class="col mt-3 d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
            <label for="logo" class="form-label m-0">Логотип</label>
            @if(array_key_exists('logo', $parameters))
                <a href="{{ url('/storage/' . $parameters['logo']) }}" class="w-50 text-truncate">{{ $parameters['logo'] }}</a>
            @endif
            <input class="form-control" type="file" name="logo" id="logo">
            <!--<div class="form-check">
                                    <input class="form-check-input" type="checkbox" name="deleteLogo" id="deleteLogoCheck">
                                    <label class="form-check-label" for="deleteLogoCheck">
                                        Удалить
                                    </label>
                                </div>-->
        </div>
        <h5 class="mt-3">Акценты</h5>
        <div class="d-flex gap-3">
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="primary_color" class="form-label m-0">Акцент 1</label>
                <input type="color" class="form-control form-control-color" id="primary_color" name="primary_color"
                    value="{{ ($parameters['primary_color'] ?? '') }}">
            </div>

            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="secondary_color" class="form-label m-0">Акцент 2</label>
                <input type="color" class="form-control form-control-color" id="secondary_color" name="secondary_color"
                    value="{{ ($parameters['secondary_color'] ?? '') }}">
            </div>
        </div>

        <h5 class="mt-3">Главное меню</h5>
        <div class="d-flex gap-3">
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="menu_btn_color" class="form-label m-0">Цвет кнопки меню</label>
                <input type="color" class="form-control form-control-color" id="menu_btn_color" name="menu_btn_color"
                    value="{{ ($parameters['menu_btn_color'] ?? '') }}">
            </div>

            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="menu_btn_hover_color" class="form-label m-0">Цвет кнопки меню при наведении</label>
                <input type="color" class="form-control form-control-color" id="menu_btn_hover_color"
                    name="menu_btn_hover_color" value="{{ ($parameters['menu_btn_hover_color'] ?? '') }}">
            </div>

            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="menu_btn_text_color" class="form-label m-0">Цвет текста кнопки меню</label>
                <input type="color" class="form-control form-control-color" id="menu_btn_text_color"
                    name="menu_btn_text_color" value="{{ ($parameters['menu_btn_text_color'] ?? '') }}">
            </div>
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="menu_btn_hover_text_color" class="form-label m-0">Цвет текста кнопки меню при наведении</label>
                <input type="color" class="form-control form-control-color" id="menu_btn_hover_text_color"
                    name="menu_btn_hover_text_color" value="{{ ($parameters['menu_btn_hover_text_color'] ?? '') }}">
            </div>
        </div>
        <h5 class="mt-3">Заголовки и надписи</h5>
        <div class="d-flex flex-column gap-3">
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="title" class="form-label m-0 w-25">Название</label>
                <input type="text" class="form-control" id="title" name="title" value="{{ ($parameters['title'] ?? '') }}">
            </div>
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="phone" class="form-label m-0  w-25">Телефон</label>
                <input type="text" class="form-control" id="phone" name="phone" value="{{ ($parameters['phone'] ?? '') }}">
            </div>
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="phone_description" class="form-label m-0  w-25">Подпись телефона</label>
                <input type="text" class="form-control" id="phone_description" name="phone_description"
                    value="{{ ($parameters['phone_description'] ?? '') }}">
            </div>
            <div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
                <label for="copyright" class="form-label m-0  w-25">Copyright</label>
                <input type="text" class="form-control" id="copyright" name="copyright"
                    value="{{ ($parameters['copyright'] ?? '') }}">
            </div>
        </div>
        <h5 class="mt-3">Прочее</h5>
        <h6 class="mt-3">Форма создания контактов</h6>
        <div class="d-flex gap-3">
            <div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
                <label for="contact_form_count" class="form-label m-0">Количество вкладок по-умолчанию</label>
                <input type="number" class="form-control" id="contact_form_count" name="contact_form_count"
                    value="{{ ($parameters['contact_form_count'] ?? '') }}">
            </div>
            <div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
                <label for="contact_form_count_max" class="form-label m-0">Максимальное количество вкладок в одной
                    форме</label>
                <input type="number" class="form-control" id="contact_form_count_max" name="contact_form_count_max"
                    value="{{ ($parameters['contact_form_count_max'] ?? '') }}">
            </div>
        </div>
        <h6 class="mt-3">Главное меню</h6>
        <div class="d-flex flex-column gap-3">
            <div class="col-6 d-flex flex-column justify-content-start align-items-start gap-2 bg-light rounded p-2">
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" value="yes" name="enable_orders_module" id="enable_orders_module">
                    <label class="form-check-label" for="enable_orders_module">
                        Включить модуль "Договоры и вознараждения"
                    </label>
                </div>
            </div>
            
        </div>
        <input type="submit" class="btn btn-primary mt-3" value="Сохранить" />
    </form>
@endsection