@extends('layouts/contentLayoutMaster')

@section('title', 'DataTables')

@section('vendor-style')
    {{-- vendor css files --}}
    <link rel="stylesheet" href="{{ asset(mix('vendors/css/tables/datatable/dataTables.bootstrap5.min.css')) }}">
    <link rel="stylesheet" href="{{ asset(mix('vendors/css/tables/datatable/responsive.bootstrap5.min.css')) }}">
    <link rel="stylesheet" href="{{ asset(mix('vendors/css/pickers/flatpickr/flatpickr.min.css')) }}">
    <link rel="stylesheet" href="{{ asset(mix('vendors/css/forms/select/select2.min.css')) }}">
@endsection

@section('page-style')
    {{-- Page Css files --}}
    <link rel="stylesheet" type="text/css" href="{{ asset('css/base/plugins/forms/pickers/form-flat-pickr.css') }}">

@endsection


@section('content')
    <!-- Ajax Sourced Server-side -->
    <section id="ajax-datatable">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header border-bottom d-flex " style="justify-content: space-between !important">
                        <h4 class="card-title">Tambah Pengaturan Hulu Sungai</h4>
                        <a href="{{ url('status_siaga/index') }}" class="btn btn-warning">Kembali</a>
                    </div>
                    <div class="card-body mt-2">
                        @if (session('error'))
                            <div class="alert p-2    alert-danger">
                                {{ session('error') }}
                            </div>
                        @endif
                        @if ($errors->any())
                            <div class="alert m-2 p-1 alert-danger">
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif
                        <form action="{{ url('status_siaga/tambah_siaga') }}" method="POST" enctype="multipart/form-data">
                            @csrf
                            <div class="form-siaga">
                                <div class="row">
                                    <div class="col-md-5 col-12">
                                        <div class="mb-1">
                                            <label class="form-label" for="select2-nested">
                                                <h5>Pilih Perangkat*</h5>
                                            </label>
                                            <select
                                                class="select2 form-select @error('uuid_device')
                                            is-invalid
                                        @enderror"
                                                id="select2-nested-status" name="uuid_device" onchange="perangkat()"
                                                required>
                                                <option value="">Pilih</option>
                                                @foreach ($perangkat as $row)
                                                    <option value="{{ $row->no }}">{{ $row->nama_device }}</option>
                                                @endforeach
                                            </select>
                                            @error('uuid_device')
                                                <small class="text-danger">{{ $message }}</small>
                                            @enderror
                                        </div>
                                    </div>
                                    <div class="col-md-7 col-12">
                                        <div class="mb-1">
                                            <label for="" style="margin-bottom: 5px !important;">
                                                <h5>Lokasi</h5>
                                            </label>
                                            <div class="input-group">
                                                <select name="lokasi" disabled class="form-control" id="lokasi">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row mt-2">
                                    <div class="title">
                                        <h4><b>Normal</b></h4>
                                    </div>
                                    <div class="col-md-4 col-12">
                                        <div>
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Minimal Ketinggian (Cm)*</h5>
                                                </label>
                                                <div class="input-group">
                                                    <input type="number"
                                                        class="form-control @error('min_normal')
                                                    is-invalid
                                                @enderror"
                                                        placeholder="Masukan Minimal Ketinggian" name="min_normal"
                                                        aria-describedby="basic-addon-search1" min="1"
                                                        value="{{ old('min_normal') }}" required>
                                                </div>
                                                @error('min_normal')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4 col-12">
                                        <div>
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Maksimal Ketinggian (Cm)*</h5>
                                                </label>
                                                <div class="input-group">
                                                    <input type="number"
                                                        class="form-control @error('max_normal')
                                                    is-invalid
                                                @enderror"
                                                        placeholder="Masukan Maksimal Ketinggian" name="max_normal"
                                                        aria-describedby="basic-addon-search1"
                                                        value="{{ old('max_normal') }}" min="1" required>
                                                </div>
                                                @error('max_normal')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4 col-12">
                                        <div>
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Jangka Waktu (Menit)*</h5>
                                                </label>
                                                <div class="input-group">
                                                    <input type="number"
                                                        class="form-control @error('durasi_normal')
                                                    is-invalid
                                                @enderror"
                                                        placeholder="Masukan Jangka Waktu" name="durasi_normal"
                                                        aria-describedby="basic-addon-search1" min="1"
                                                        value="{{ old('durasi_normal') }}" required>
                                                </div>
                                                @error('durasi_normal')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <div id="siaga">
                                    <div class="row mt-2">
                                        <div class="title">
                                            <h4><b>Siaga 4</b></h4>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Minimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('min_siaga_4')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Minimal Ketinggian" name="min_siaga_4"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('min_siaga_4') }}" required>
                                                    </div>
                                                    @error('min_siaga_4')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Maksimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('max_siaga_4')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Maksimal Ketinggian" name="max_siaga_4"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('max_siaga_4') }}" required>
                                                    </div>
                                                    @error('max_siaga_4')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Jangka Waktu (Menit)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('durasi_siaga_4')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Jangka Waktu" name="durasi_siaga_4"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('durasi_siaga_4') }}" required>
                                                    </div>
                                                    @error('durasi_siaga_4')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    {{-- <div class="row">
                                        <div class="col-md-8  col-12">
                                            <div class="mb-1">
                                                <label class="form-label" for="select2-nested">
                                                    <h5>Broadcast Peringatan WhastApp*</h5>
                                                </label>
                                                <select
                                                    class="select2 form-select  @error('group_siaga_4')
                                                is-invalid
                                            @enderror"
                                                    multiple="multiple" name="group_siaga_4[]"
                                                    id="default-select-multi-empat" required>
                                                    @foreach ($group as $main_satu)
                                                        <option value="{{ $main_satu->uuid }}">{{ $main_satu->group }}
                                                        </option>
                                                    @endforeach
                                                </select>
                                                @error('group_siaga_4')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Status Broadcast Peringatan Whatsapp</h5>
                                                </label>
                                                <div class="d-flex flex-column">
                                                    <div class="form-check form-check-primary form-switch">
                                                        <input type="checkbox" name="active_siaga_4"
                                                            class="form-check-input" id="customSwitch3" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Pesan Broadcast Peringatan Whatsapp*</h5>
                                                </label>
                                                <textarea name="pesan_siaga_4" id="pesan_siaga_4" required placeholder="Pesan Broadcast Peringatan Whatsapp"
                                                    class="form-control @error('pesan_siaga_4')
                                                    is-invalid
                                                @enderror"
                                                    cols="30" rows="5"></textarea>
                                                @error('pesan_siaga_4')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div> --}}
                                </div>
                                <div id="siaga">
                                    <div class="row mt-2">
                                        <div class="title">
                                            <h4><b>Siaga 3</b></h4>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Minimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('min_siaga_3')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Minimal Ketinggian" name="min_siaga_3"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('min_siaga_3') }}" required>
                                                    </div>
                                                    @error('min_siaga_3')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Maksimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('max_siaga_3')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Maksimal Ketinggian" name="max_siaga_3"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('max_siaga_3') }}" required>
                                                    </div>
                                                    @error('max_siaga_3')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Jangka Waktu (Menit)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('durasi_siaga_3')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Jangka Waktu" name="durasi_siaga_3"
                                                            aria-describedby="basic-addon-search1" required min="1"
                                                            value="{{ old('durasi_siaga_3') }}">
                                                    </div>
                                                    @error('durasi_siaga_3')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    {{-- <div class="row">
                                        <div class="col-md-8  col-12">
                                            <div class="mb-1">
                                                <label class="form-label" for="select2-nested">
                                                    <h5>Broadcast Peringatan WhastApp*</h5>
                                                </label>
                                                <select
                                                    class="select2 form-select  @error('group_siaga_3')
                                                is-invalid
                                            @enderror"
                                                    multiple="multiple" name="group_siaga_3[]"
                                                    id="default-select-multi-tiga" required>
                                                    @foreach ($group as $main_satu)
                                                        <option value="{{ $main_satu->uuid }}">{{ $main_satu->group }}
                                                        </option>
                                                    @endforeach
                                                </select>
                                                @error('group_siaga_3')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Status Broadcast Peringatan Whatsapp</h5>
                                                </label>
                                                <div class="d-flex flex-column">
                                                    <div class="form-check form-check-primary form-switch">
                                                        <input type="checkbox" name="active_siaga_3"
                                                            class="form-check-input" id="customSwitch3" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Pesan Broadcast Peringatan Whatsapp*</h5>
                                                </label>
                                                <textarea name="pesan_siaga_3" id="pesan_siaga_3" required placeholder="Pesan Broadcast Peringatan Whatsapp"
                                                    class="form-control @error('pesan_siaga_3')
                                                    is-invalid
                                                @enderror"
                                                    cols="30" rows="5"></textarea>
                                                @error('pesan_siaga_3')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div> --}}
                                </div>
                                <div id="siaga">
                                    <div class="row mt-2">
                                        <div class="title">
                                            <h4><b>Siaga 2</b></h4>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Minimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('min_siaga_2')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Minimal Ketinggian" name="min_siaga_2"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('min_siaga_2') }}" required>
                                                    </div>
                                                    @error('min_siaga_2')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Maksimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('max_siaga_2')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Maksimal Ketinggian" name="max_siaga_2"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('max_siaga_2') }}" required>
                                                    </div>
                                                    @error('max_siaga_2')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Jangka Waktu (Menit)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('durasi_siaga_2')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Jangka Waktu" name="durasi_siaga_2"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('durasi_siaga_2') }}" required>
                                                    </div>
                                                    @error('durasi_siaga_2')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    {{-- <div class="row">
                                        <div class="col-md-8  col-12">
                                            <div class="mb-1">
                                                <label class="form-label" for="select2-nested">
                                                    <h5>Broadcast Peringatan WhastApp*</h5>
                                                </label>
                                                <select
                                                    class="select2 form-select  @error('group_siaga_2')
                                                is-invalid
                                            @enderror"
                                                    multiple="multiple" name="group_siaga_2[]"
                                                    id="default-select-multi-dua" required>
                                                    @foreach ($group as $main_satu)
                                                        <option value="{{ $main_satu->uuid }}">{{ $main_satu->group }}
                                                        </option>
                                                    @endforeach
                                                </select>
                                                @error('group_siaga_2')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Status Broadcast Peringatan Whatsapp</h5>
                                                </label>
                                                <div class="d-flex flex-column">
                                                    <div class="form-check form-check-primary form-switch">
                                                        <input type="checkbox" name="active_siaga_2"
                                                            class="form-check-input" id="customSwitch3" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Pesan Broadcast Peringatan Whatsapp*</h5>
                                                </label>
                                                <textarea name="pesan_siaga_2" id="pesan_siaga_2" required placeholder="Pesan Broadcast Peringatan Whatsapp"
                                                    class="form-control @error('pesan_siaga_2')
                                                    is-invalid
                                                @enderror"
                                                    cols="30" rows="5"></textarea>
                                                @error('pesan_siaga_2')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div> --}}
                                </div>
                                <div id="siaga">
                                    <div class="row mt-2">
                                        <div class="title">
                                            <h4><b>Siaga 1</b></h4>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Minimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('min_siaga_1')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Minimal Ketinggian" name="min_siaga_1"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('min_siaga_1') }}" required>
                                                    </div>
                                                    @error('min_siaga_1')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Maksimal Ketinggian (Cm)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('max_siaga_1')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Maksimal Ketinggian" name="max_siaga_1"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('max_siaga_1') }}" required>
                                                    </div>
                                                    @error('max_siaga_1')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div>
                                                <div class="mb-1">
                                                    <label for="" style="margin-bottom: 5px !important;">
                                                        <h5>Jangka Waktu (Menit)*</h5>
                                                    </label>
                                                    <div class="input-group">
                                                        <input type="number"
                                                            class="form-control @error('durasi_siaga_1')
                                                        is-invalid
                                                    @enderror"
                                                            placeholder="Masukan Jangka Waktu" name="durasi_siaga_1"
                                                            aria-describedby="basic-addon-search1" min="1"
                                                            value="{{ old('durasi_siaga_1') }}" required>
                                                    </div>
                                                    @error('durasi_siaga_1')
                                                        <small class="text-danger">{{ $message }}</small>
                                                    @enderror
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    {{-- <div class="row">
                                        <div class="col-md-8  col-12">
                                            <div class="mb-1">
                                                <label class="form-label" for="select2-nested">
                                                    <h5>Broadcast Peringatan WhastApp*</h5>
                                                </label>
                                                <select
                                                    class="select2 form-select  @error('group_siaga_1')
                                                is-invalid
                                            @enderror"
                                                    multiple="multiple" name="group_siaga_1[]" id="default-select-multi"
                                                    required>
                                                    @foreach ($group as $main_satu)
                                                        <option value="{{ $main_satu->uuid }}">{{ $main_satu->group }}
                                                        </option>
                                                    @endforeach
                                                </select>
                                                @error('group_siaga_1')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                        <div class="col-md-4 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Status Broadcast Peringatan Whatsapp</h5>
                                                </label>
                                                <div class="d-flex flex-column">
                                                    <div class="form-check form-check-primary form-switch">
                                                        <input type="checkbox" name="active_siaga_1"
                                                            class="form-check-input" id="customSwitch3" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8 col-12">
                                            <div class="mb-1">
                                                <label for="" style="margin-bottom: 5px !important;">
                                                    <h5>Pesan Broadcast Peringatan Whatsapp*</h5>
                                                </label>
                                                <textarea name="pesan_siaga_1" id="pesan_siaga_1" required placeholder="Pesan Broadcast Peringatan Whatsapp"
                                                    class="form-control @error('pesan_siaga_1')
                                                    is-invalid
                                                @enderror"
                                                    cols="30" rows="5"></textarea>
                                                @error('pesan_siaga_1')
                                                    <small class="text-danger">{{ $message }}</small>
                                                @enderror
                                            </div>
                                        </div>
                                    </div> --}}
                                </div>
                                <div class="row">
                                    <div class="col-md-8 col-12">
                                        <div class="mb-1">
                                            <label for="" style="margin-bottom: 5px !important;">
                                                <h5>Nama Pengaturan*</h5>
                                            </label>
                                            <div class="input-group">
                                                <input type="text"
                                                    class="form-control @error('nama_setting_siaga')
                                                is-invalid
                                            @enderror"
                                                    placeholder="Nama Pengaturan" name="nama_setting_siaga"
                                                    aria-describedby="basic-addon-search1"
                                                    value="{{ old('nama_setting_siaga') }}" required>
                                            </div>
                                            @error('nama_setting_siaga')
                                                <small class="text-danger">{{ $message }}</small>
                                            @enderror
                                        </div>
                                        <div class="mb-1">
                                            <label for="" style="margin-bottom: 5px !important;">
                                                <h5>Status Aktif</h5>
                                            </label>
                                            <div class="d-flex flex-column">
                                                <div class="form-check form-check-primary form-switch">
                                                    <input type="checkbox" name="active" class="form-check-input"
                                                        id="customSwitch3" value="1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>



                            </div>
                            <button type="submit" class="btn btn-primary">Simpan</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script>
        function perangkat() {
            let val = $("#select2-nested-status").val()
            $.ajax({
                url: "{{ url('status_siaga/ambil_device') }}/" + val,
                success: function(data) {
                    $("#lokasi").html(data)
                }
            })
        }
    </script>
@endsection


@section('vendor-script')
    {{-- vendor files --}}
    <script src="{{ asset(mix('vendors/js/tables/datatable/jquery.dataTables.min.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/tables/datatable/dataTables.bootstrap5.min.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/tables/datatable/dataTables.responsive.min.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/tables/datatable/responsive.bootstrap5.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/pickers/flatpickr/flatpickr.min.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/forms/select/select2.full.min.js')) }}"></script>
    <script src="{{ asset(mix('vendors/js/forms/repeater/jquery.repeater.min.js')) }}"></script>
@endsection

@section('page-script')
    {{-- Page js files --}}
    <script src="{{ asset(mix('js/scripts/tables/table-datatables-advanced.js')) }}"></script>
    <script src="{{ asset(mix('js/scripts/forms/form-select2.js')) }}"></script>
    <script src="{{ asset(mix('js/scripts/components/components-modals.js')) }}"></script>
    <script>
        $(document).ready(function() {
            $("#table").DataTable();
        });
        $((function() {
            "use strict";
            $(".invoice-repeater, .repeater-default").repeater({
                show: function() {
                    $(this).slideDown(), feather && feather.replace({
                        width: 14,
                        height: 14
                    })
                },
                hide: function(e) {
                    confirm("Apakah Anda Yakin ingin menghapus elemen ini?") && $(this).slideUp(e)
                }
            })
        }));
    </script>
@endsection
