@extends('admin.layouts.app')

@section('panel')
    <div class="row gy-4">
        <div class="col-xxl-3 col-sm-6">
            <x-widget
                      style="2"
                      icon_style="false"
                      link="{{ route('admin.tool.index') }}"
                      icon="las la-tools"
                      title="Total Tools"
                      value="{{ $widget['total_tools'] }}"
                      color="primary" />
        </div><!-- dashboard-w1 end -->
        <div class="col-xxl-3 col-sm-6">
            <x-widget
                      style="2"
                      icon_style="false"
                      link="{{ route('admin.tool.index') }}?status=active"
                      icon="las la-check-circle"
                      title="Active Tools"
                      value="{{ $widget['active_tools'] }}"
                      color="success" />
        </div><!-- dashboard-w1 end -->
        <div class="col-xxl-3 col-sm-6">
            <x-widget
                      style="2"
                      icon_style="false"
                      link="{{ route('admin.tool.index') }}?status=inactive"
                      icon="las la-ban"
                      title="Inactive Tools"
                      value="{{ $widget['inactive_tools'] }}"
                      color="warning" />
        </div>
        <div class="col-xxl-3 col-sm-6">
            <x-widget
                      style="2"
                      icon_style="false"
                      link="{{ route('admin.advertisement.index') }}"
                      icon="las la-ad"
                      title="Total Advertisements"
                      value="{{ $widget['total_ads'] }}"
                      color="info" />
        </div>
    </div>


    <div class="row gy-4 mt-2">
        <h5>@lang('Top Views Tools')</h5>
        @foreach ($topViewsTools as $tool)
            <div class="col-xxl-3 col-sm-6">
                <x-widget
                          style="3"
                          link="{{ route('admin.tool.index') }}"
                          title="{{ $tool->name }}"
                          icon="las la-network-wired"
                          value="{{ $tool->views }} Views"
                          bg="3" />
            </div>
        @endforeach
    </div>
@endsection
