@extends('layouts.app')

@section('content')

    <div class="container-fluid">

        <div class="d-flex justify-content-between mb-3">

            <h4 class="fw-bold">Sequencing Analysis</h4>

            <div class="d-flex align-items-center gap-2">

                <select id="trend_range" class="form-select w-auto">
                    <option value="8" selected>Last 8 weeks</option>
                    <option value="12">Last 12 weeks</option>
                    <option value="26">Last 26 weeks</option>
                    <option value="custom">Custom range</option>
                </select>

                <div id="custom_range_container" style="display:none;" class="align-items-center gap-1">
                    <select id="start_year" class="form-select"></select>
                    <select id="start_week" class="form-select"></select>
                    <span class="mx-1">to</span>
                    <select id="end_year" class="form-select"></select>
                    <select id="end_week" class="form-select"></select>
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body" style="height:600px;">
                <canvas id="sequencingChart"></canvas>
            </div>
        </div>
        <div class="row mt-3">

            <!-- Counts -->
            <div class="col-md-6">
                <div class="card">
                    <div class="card-body" style="height:600px;">
                        <h6 class="fw-bold">Lineage Counts Over Time</h6>
                        <canvas id="sequencingCountChart"></canvas>
                    </div>
                </div>
            </div>

            <!-- Distribution -->
            <div class="col-md-6">
                <div class="card">
                    <div class="card-body" style="height:600px;">
                        <h6 class="fw-bold">Total Sequenced Samples Over Time</h6>
                        <canvas id="sequencingTotalChart" style="height: 550px;"></canvas>
                    </div>
                </div>
            </div>

        </div>

    </div>

@endsection

@section('scripts')
    <script>
        window.SURVEILLANCE_ID = 6; 
    </script>

    <script src="/js/sequencing.js"></script>
@endsection