@extends('layouts.app')

@section('content')
<script>

</script>
    <div>
        <div class="d-block d-lg-none">
            <div class="bg-white p-3 border border-light-subtle rounded-3 mb-3">
                @livewire('citymanagerinfo')
            </div>
        </div>
        @if(GetAvailableAgents()->count())
            <div class="row d-none d-md-flex">
                <div class="col-12 col-lg-6 d-flex flex-column gap-3" style="max-height:380px">
                    @if(array_key_exists('plan7_iframe', DESIGN_PARAMETERS))
                    <div class="" data-bs-toggle="modal" data-bs-target="#plan7Modal">
                        <a href="#"
                            class="btn list-group-item list-group-item-action p-3 bg-white rounded border border-light-subtle"
                            aria-current="true">
                            <div class="d-flex flex-row">
                                <div class="p-2">
                                    <div class="lh-1 fs-1 bg-primary m-3 rounded-pill d-flex align-items-center justify-content-center" style="width:60px;height:60px">
                                        <i class="bi bi-journal-richtext  "></i>
                                    </div>
                                </div>
                                <div class="align-self-center">
                                    <div class="d-flex w-100 justify-content-between">
                                        <h3 class="mb-1">Подобрать квартиру</h3>
                                    </div>
                                    <p class="mb-1 fs-6">Быстро подберите подходящий вариант для клиента из нашего каталога</p>
                                </div>
                            </div>
                        </a>
                    </div>
                    @endif
                    <div class="bg-light px-2 flex-fill rounded overflow-hidden">
                        <div class="hstack gap-2">
                            <div class="fs-5 fw-bold">Клиенты</div>
                            <div class="ms-auto p-2">
                                <a href="{{ route('clients.table') }}">Смотреть все</a>
                            </div>
                        </div>
                        <div>
                            @livewire('clientsTable', ['count' => 10, 'mode' => 'short'])
                        </div>
                    </div>
                </div>
                <div class="form-wrap col-12 col-lg-6">
                    <div class="form-wrap__inner p-2 px-sm-4 py-sm-3 bg-primary border rounded-3 mx-auto" style="">
                        <div class="h4 pb-2 my-3 fw-bold d-flex flex-column">
                            <small>Добавить клиента</small>
                        </div>
                        <livewire:ClientCreator />
                        <div class="dots rounded-bottom-4 bg-primary p-1 w-100">
                            <div class="text-center" style="margin-bottom:-9px">
                                <i class="bi bi-three-dots"></i>
                            </div> 
                        </div>
                    </div>
                </div>
            </div>
        @endif
    </div>
    <style>
        
    </style>
    <div class="mt-3">
        <div class="d-flex">
            <div class="fs-5 fw-bold">Новости</div>
            <a class="ms-auto p-2" href="{{ route('posts') }}">Смотреть все</a>
        </div>
        @livewire('posts.list', [
            'count' => 3,
        ])
    </div>
    <div class="mt-3 col-12 d-none">
        <div class="d-flex">
            <div class="fs-5 fw-bold">Избранное</div>
            <div class="ms-auto p-2">Смотреть все</div>
        </div>
        <div class="d-lg-flex">
            <div class="card flex-fill m-2" style="">
                <div class="card-img-top ratio ratio-16x9">
                    <img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
                        class="" alt="...">
                    <div class="position-absolute bottom-0 start-0 m-3">
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
                            корпуса</span>
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
                            5%</span>
                    </div>
                </div>
                <div class="card-body">
                    <h5 class="d-flex card-title fw-bold">
                        <span class="">Пионер</span>
                        <span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
                    </h5>
                    <p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
                </div>
            </div>
            <div class="card flex-fill m-2" style="">
                <div class="card-img-top ratio ratio-16x9">
                    <img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
                        class="" alt="...">
                    <div class="position-absolute bottom-0 start-0 m-3">
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
                            корпуса</span>
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
                            5%</span>
                    </div>
                </div>
                <div class="card-body">
                    <h5 class="d-flex card-title fw-bold">
                        <span class="">Пионер</span>
                        <span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
                    </h5>
                    <p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
                </div>
            </div>
            <div class="card flex-fill m-2" style="">
                <div class="card-img-top ratio ratio-16x9">
                    <img src="https://img3.sibdom.ru/images/photo_crop_282_212/houses/photo_main/97/97be/97be2371dd0bba9c4605c3ea6f06e213.jpg"
                        class="" alt="...">
                    <div class="position-absolute bottom-0 start-0 m-3">
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Новые
                            корпуса</span>
                        <span class="badge bg-light text-dark border-secondary bg-opacity-75 fs-6 rounded-pill">Ипотека
                            5%</span>
                    </div>
                </div>
                <div class="card-body">
                    <h5 class="d-flex card-title fw-bold">
                        <span class="">Пионер</span>
                        <span class="ms-auto fw-bold fs-6" style="color:#e6662a">от 4,5 млн. Р</span>
                    </h5>
                    <p class="card-text">Иркутск, ул. 4-я Совесткая, 11</p>
                </div>
            </div>
        </div>
    </div>
@endsection
