@extends('layouts.yellow')
@section('content')
    <div class="container-fluid">
        <div class="row">
            <div class="col-12 p-3">
                <div class="card">
                    <div class="card-header">
                        <h2>{{ $file->friendly_name }}</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="float-end p-3">
                    <a href="javascript:history.back()" class="btn btn-primary"> {{__("com-form-history.backReturn")}} </a>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="text-center">
                @if(strtoupper($file->extension) === "PDF")
                    <object data="{{ route('files.show', $file->path) }}" type="application/pdf" width="100%" height="1200px">
                 @elseif(strtoupper($file->extension) === "PNG" || strtoupper($file->extension) === "JPG" || strtoupper($file->extension) === "JPEG")
                     <img class="mx-auto d-block" src="{{ route('files.show', $file->path) }}">
                 @else
                    <div class="alert alert-info">
                        {{__("com-form-history.formatNotValid")}}
                    </div>
                @endif
                </div>
            </div>
        </div>
    </div>
@endsection