{{------- must be included on the call page ---------------------------------------------}}
{{--@section('styles')--}}
{{--@parent--}}
{{--<link href="{{ asset('css/item_small_view.css') }}" rel="stylesheet">--}}
{{--@endsection--}}

@isset($item)
    <div class="container">
        <div class="col-md-12 item-small-view">
            <div class="card">
                <h4 class="card-header text-right bg-dark text-white">{{ $item->caption }}
                    <div class="float-left small">
                        {{--<a class="btn btn-raised btn-danger" href="#" title="Профиль"--}}
                           {{--data-toggle="tooltip"--}}
                           {{--data-placement="top">--}}
                            {{--<i class="fa fa-user" aria-hidden="true"></i>--}}
                        {{--</a>--}}
                        <a class="btn btn-raised btn-primary" href="#sendOffer" title="Предложить на обмен"
                           data-item-id="{{ $item->id }}">
                            <i class="fa fa-envelope" aria-hidden="true"></i>
                        </a>
                        <a class="btn btn-raised btn-danger" href="{{ route('item.info',$item) }}" title="Просмотреть">
                            <i class="fa fa-eye" aria-hidden="true"></i>
                        </a>
                    </div>
                </h4>
                <div class="card-body">
                    <div class="image float-right user-r">
                        @if(isset($item->picture[0]))
                            <img src="{{ route('images', $item->picture[0]->path) }}" class="img-thumbnail" alt="avatar">
                        @else
                            <img src="{{ route('images', '/items/default') }}" class="img-thumbnail" alt="avatar">
                        @endif
                    </div>
                    <div class="description">
                        <p class="card-text">{{ $item->description }}</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endisset