<?php $col = (isset($ticket) && $ticket->ticketFoto != null) ? 'col-md-7' : 'col-md-12'; ?>
<div class="col-sm-12 col-md-5">
    <div class="row">
        <div class="col-sm-12 col-md-12">
            <div class="row">
                <div class="col-md-12 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('sede_label', 'Sede', ['class' => '']) !!}
                        {!! Form::text('sede_label',(isset($persona) ? $persona->area->sede->nombre : null),['class'=>'form-control input-sm','id'=>'sede_label','placeholder'=>'Sede','disabled'=>true]) !!}
                    </div>
                </div>
                <div class="col-md-12 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('area_label', 'Area', ['class' => '']) !!}
                        {!! Form::text('area_label',(isset($persona) ? $persona->area->nombre : null),['class'=>'form-control input-sm','id'=>'area_label','placeholder'=>'Area','disabled'=>true]) !!}
                    </div>
                </div>
                <div class="col-md-12 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('cargo_label', 'Cargo', ['class' => '']) !!}
                        {!! Form::text('cargo_label',(isset($persona) ? $persona->cargo->nombre : null),['class'=>'form-control input-sm','id'=>'cargo_label','placeholder'=>'Cargo','disabled'=>true]) !!}
                    </div>
                </div>

                <div class="col-md-12 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('apellidos_nombres_label', 'Apellidos y Nombres', ['class' => '']) !!}
                        {!! Form::text('apellidos_nombres_label',(isset($persona) ? $persona->apellidos_nombres : null),['class'=>'form-control input-sm','id'=>'apellidos_nombres_label','placeholder'=>'Apellidos y Nombres','disabled'=>true]) !!}
                    </div>
                </div>
                <div class="col-md-6 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('telefono_label', 'Teléfono Empresa', ['class' => '']) !!}
                        {!! Form::text('telefono_label',(isset($persona) ? $persona->telefono_empresa : null),['class'=>'form-control input-sm','id'=>'telefono_label','placeholder'=>'Teléfono Empresa','disabled'=>true]) !!}
                    </div>
                </div>
                <div class="col-md-6 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('anexo_label', 'Anexo', ['class' => '']) !!}
                        {!! Form::text('anexo_label',(isset($persona) ? $persona->anexo : null),['class'=>'form-control input-sm','id'=>'anexo_label','placeholder'=>'Anexo','disabled'=>true]) !!}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="col-sm-12 col-md-7">
    <div class="row">
        <div class="col-sm-12 col-md-12">
            <div class="row">
                <div class="col-md-6 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('categoria_ticket_id', 'Categoría', ['class' => '']) !!}
                        {!! Form::text('categoria_ticket_id',(isset($ticket) ? $ticket->categoriaTicket->nombre : null),['class'=>'form-control input-sm','id'=>'categoria_ticket_id','placeholder'=>'Categoría','readonly'=>true]) !!}
                    </div>
                </div>
                <div class="col-md-6 col-sm-12">
                    <div class="form-group fg-line">
                        {!! Form::label('tipo_ticket_id', 'Tipo', ['class' => '']) !!}
                        {!! Form::text('tipo_ticket_id',(isset($ticket) ? $ticket->tipoTicket->nombre : null),['class'=>'form-control input-sm','id'=>'tipo_ticket_id','placeholder'=>'Tipo','readonly'=>true]) !!}
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-12 col-md-12">
            <div class="row">
                <div class="col-sm-12 {{ $col }}">
                    <div class="row">
                        <div class="col-sm-12 col-md-12">
                            <div class="form-group fg-line">
                                {!! Form::label('asunto', 'Asunto', ['class' => '']) !!}
                                {!! Form::text('asunto',(isset($ticket) ? $ticket->asunto : null),['class'=>'form-control input-sm','id'=>'asunto','placeholder'=>'Asunto','readonly'=>true]) !!}
                            </div>
                        </div>
                        <div class="col-sm-12 col-md-12">
                            <div class="form-group fg-line">
                                {!! Form::label('descripcion', 'Descripción', ['class' => '']) !!}
                                {!! Form::textArea('descripcion',(isset($ticket) ? $ticket->descripcion : null),['class'=>'form-control input-sm','rows'=>'2','id'=>'descripcion','placeholder'=>'Descripción','readonly'=>true]) !!}
                            </div>
                        </div>
                    </div>
                </div>
                @if(isset($ticket) && $ticket->ticketFoto != null )
                    <div class="col-sm-12 col-md-5 text-center">
                        <img src="{{ $ticket->ticketFoto->rutaFotoOriginal }}" alt=" " class="w-100"
                             style="border-radius: 5px;">
                        <p class="fotoLink">
                            <a href="{{ $ticket->ticketFoto->rutaFotoOriginal }}" target="_blank">Ver tamaño
                                original</a>
                        </p>
                    </div>
                @endif
            </div>
        </div>
        <div class="col-sm-12 col-md-12">
            <div class="form-group fg-line">
                {!! Form::label('mensaje_conincidencia', '¿Presenta Incidencia?', ['class' => 'f-weight']) !!}
                {!! Form::textArea('mensaje_conincidencia',null,['class'=>'form-control input-sm','rows'=>'2','id'=>'mensaje_conincidencia','placeholder'=>'Describa la incidencia...']) !!}
            </div>
        </div>
    </div>
</div>
<style>
    p.fotoLink {
        margin-top: 5px;
        background: #00796B;
        border-radius: 5px;
    }

    p.fotoLink a {
        color: #fff;
        text-decoration: none;
    }
</style>
<script>
    $(function () {
        $('.select').select2();
    });
</script>