@extends('layouts.master')
@section('css')
@endsection
@section('content')
<div class="flex flex-col gap-6">
    <div class="card">
        <div class="card-header">
            <div class="flex justify-between items-center">
                <h4 class="card-title">{{$title}}</h4>
            </div>
        </div>
        <div class="p-6">
            <div class="grid lg:grid-cols-2 gap-3 mb-3">
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-building-4-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-col">
                        <div class="text-sm"><b>Instansi</b></div> 
                        <div class="text-xs">{{$item->instansi->name}}</div>
                    </div>
                </div>
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-database-2-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-col">
                        <div class="text-sm"><b>Resource Data</b></div> 
                        <div class="text-xs">{{$item->template->name}}</div>
                    </div>
                </div>
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-database-2-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-col">
                        <div class="text-sm"><b>Nama Dataset</b></div> 
                        <div class="text-xs">{{$item->name}}</div>
                    </div>
                </div>
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-database-2-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-col">
                        <div class="text-sm"><b>Sifat Dataset</b></div> 
                        <div>
                            @if($item->publik == 1)
                                <span class="text-xs">Terbuka/Publik</span>
                            @else
                                <span class="text-xs">Rahasia/Private</span>
                            @endif
                        </div>
                    </div>
                </div>
            </div>
            <div class="grid lg-grid-cols-1 gap-3">
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-database-2-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-row gap-2">
                        <div class="text-sm">
                            <b>File</b> 
                        </div> 
                        <div>
                            <a href="{{asset('uploads/'.@$item->file)}}" class="p-1 bg-primary rounded text-white text-xs"><i class="ri-download-line"></i>&nbsp;Download File</a>
                        </div>
                    </div>
                </div>
                <div class="flex flex-between gap-3 bg-secondary/10 items-center p-2 rounded">
                    <div class="p-2">
                        <i class="ri-information-line text-primary text-xl"></i>
                    </div>
                    <div class="flex flex-col">
                        <div class="text-sm"><b>Deskripsi</b></div> 
                        <div class="text-xs">{{$item->deskripsi}}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('js')
@endsection