@php
    $cannulation_route[] = 'Transampulla';
    $cannulation_route[] = 'Trans-PTBD';
    $cannulation_route[] = 'Transcholedochoduodenal fistula (CDS)';
    $cannulation_route[] = 'Transhepaticogastric Fistula';
    $cannulation_route[] = 'Transhepaticoduodenal Fistula';
    $cannulation_route[] = 'Minor Ampulla';
    $cannulation_route[] = 'Transcurtaneous (T-Tube)';
    $cannulation_route[] = 'Trans-SEMs';
    $cannulation_route[] = 'Trancutaneous (Fistula)';
    $cannulation_route[] = 'Transhepatico-Jejunostomy (Trans-HJ)';

    $cannulation_technicq[] = 'Guidewire First';
    $cannulation_technicq[] = 'Contrast First';
    $cannulation_technicq[] = 'Re-Guidewire after Contrast(Failed Guidewire)';
    $cannulation_technicq[] = 'Double Guidewire';
    $cannulation_technicq[] = 'Parallel PD Stent';
    $cannulation_technicq[] = 'Rotatable Sphincterotome';
    $cannulation_technicq[] = 'Ampulla Reposition (Biopsy)';
    $cannulation_technicq[] = 'Ampulla Reposition (Guidewire)';
    $cannulation_technicq[] = 'Ampulla Reposition (Clip)';
    $cannulation_technicq[] = 'Ampulla Reposition (Injection)';
    $cannulation_technicq[] = 'Ampulla Reposition (Traction)';
    $cannulation_technicq[] = 'Needle Knife Papillotomy';
    $cannulation_technicq[] = 'Needle Knife Fistulotomy';
    $cannulation_technicq[] = 'TransPD P-Cut';
    $cannulation_technicq[] = 'Septotomy';
    $cannulation_technicq[] = "Unroof Papillotomy (Bellringer's Technique)";
    $cannulation_technicq[] = 'Transduodenal Rendezvous';
    $cannulation_technicq[] = 'Transhepatic Rendezvous';
    $cannulation_technicq[] = 'TransPD Rendezvous';

    $cannulation_guidewire[] = '0.035 (Straight Tip)';
    $cannulation_guidewire[] = '0.035 (Curve Tip)';
    $cannulation_guidewire[] = '0.025 (Straight Tip)';
    $cannulation_guidewire[] = '0.025 (Curve Tip)';
    $cannulation_guidewire[] = '0.025 (Stiff wire, Straight tip)';
    $cannulation_guidewire[] = '0.025 (Stiff wire, Curve tip)';
    $cannulation_guidewire[] = '0.025 Navipro/Terumo';
    $cannulation_guidewire[] = '0.018 (Straight Tip)';
    $cannulation_guidewire[] = '0.018 (Curve Tip)';

    $cannulation_outcome[] = 'None';
    $cannulation_outcome[] = 'Success';
    $cannulation_outcome[] = 'Fail';

    $cannulation_compli[] = 'None';
    $cannulation_compli[] = 'Bleeding (Massive)';
    $cannulation_compli[] = 'Bleeding (Minimal)';
    $cannulation_compli[] = 'Bleeding (Delay)';
    $cannulation_compli[] = 'Perforation (Scope)';
    $cannulation_compli[] = 'Perforation (Guidewire)';

    $cannulation_complimanage[] = 'None';
    $cannulation_complimanage[] = 'Observation';
    $cannulation_complimanage[] = 'Adrenalin Injection';
    $cannulation_complimanage[] = 'APC';
    $cannulation_complimanage[] = 'Balloon Temponade';
    $cannulation_complimanage[] = 'Clip';
    $cannulation_complimanage[] = 'Emergency Rescue Lithotriptor';
    $cannulation_complimanage[] = 'Endoloop';
    $cannulation_complimanage[] = 'Endoscopic Necrosectomy/Debridement';
    $cannulation_complimanage[] = 'Glue Injection';
    $cannulation_complimanage[] = 'Gold Probe';
    $cannulation_complimanage[] = 'Hemospray';
    $cannulation_complimanage[] = 'Metalic Stent';
    $cannulation_complimanage[] = 'NG';
    $cannulation_complimanage[] = 'OVESCO';
    $cannulation_complimanage[] = 'Plastic Stent';
    $cannulation_complimanage[] = 'Re-Stenting';
    $cannulation_complimanage[] = 'Remove Foreign Body';
    $cannulation_complimanage[] = 'Rubber Band';
    $cannulation_complimanage[] = 'Sclerosing Injection';
    $cannulation_complimanage[] = 'Snare tip';

    $cannulation_pdcannu[] = '1-2 times';
    $cannulation_pdcannu[] = '3-4 times';
    $cannulation_pdcannu[] = '≥ 5 times';

    $cannulation_pdinjec[] = 'None';
    $cannulation_pdinjec[] = 'Single';
    $cannulation_pdinjec[] = 'Multiple';

    $cannulation_prophy[] = 'Yes';
    $cannulation_prophy[] = 'No';

    $cannulation_amputype[] = 'Type I (Nipple)';
    $cannulation_amputype[] = 'Type II (Behind Fold)';
    $cannulation_amputype[] = 'Type III (Turtle)';
    $cannulation_amputype[] = 'Type IIr (Wavy)';
    $cannulation_amputype[] = 'Type IVa (Intra-Diverticular)';
    $cannulation_amputype[] = 'Type IVb (Peri-vatarian)';
    $cannulation_amputype[] = 'Type V (Bilateral Diverticulum)';
    $cannulation_amputype[] = 'Type VI (Subpyrolic)';
    $cannulation_amputype[] = 'Type Vllu (Ulcer)';
    $cannulation_amputype[] = 'Type VIIm (Ampulla Mass)';
    $cannulation_amputype[] = 'S/P Est (Non Virgin)';
    $cannulation_amputype[] = 'Impact Stone';
    $cannulation_amputype[] = 'Type VIlm+u (Mass c Ulcer)';

    $cannulation_est[] = 'None';
    $cannulation_est[] = 'Sphincterotomy';
    $cannulation_est[] = 'Balloon Dilatation';
    $cannulation_est[] = 'Combined';

    // $cannulation_route[] = 'Transampulla';
    // $cannulation_route[] = 'Trans-PTBD';
    // $cannulation_route[] = 'Transcholedochoduodenal fistula (CDS)';
    // $cannulation_route[] = 'Transhepaticogastric Fistula';
    // $cannulation_route[] = 'Transhepaticoduodenal Fistula';
    // $cannulation_route[] = 'Minor Ampulla';
    // $cannulation_route[] = 'Transcurtaneous (T-Tube)';
    // $cannulation_route[] = 'Trans-SEMs';
    // $cannulation_route[] = 'Trancutaneous (Fistula)';
    // $cannulation_route[] = 'Transhepatico-Jejunostomy (Trans-HJ)';

    // $cannulation_technicq[] = 'Guidewire First';
    // $cannulation_technicq[] = 'Contrast First';
    // $cannulation_technicq[] = 'Re-Guidewire after Contrast(Failed Guidewire)';
    // $cannulation_technicq[] = 'Double Guidewire';
    // $cannulation_technicq[] = 'Parallel PD Stent';
    // $cannulation_technicq[] = 'Rotatable Sphincterotome';
    // $cannulation_technicq[] = 'Ampulla Reposition (Biopsy)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Guidewire)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Clip)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Injection)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Traction)';
    // $cannulation_technicq[] = 'Needle Knife Papillotomy';
    // $cannulation_technicq[] = 'Needle Knife Fistulotomy';
    // $cannulation_technicq[] = 'TransPD P-Cut';
    // $cannulation_technicq[] = 'Septotomy';
    // $cannulation_technicq[] = "Unroof Papillotomy (Bellringer's Technique)";
    // $cannulation_technicq[] = 'Transduodenal Rendezvous';
    // $cannulation_technicq[] = 'Transhepatic Rendezvous';
    // $cannulation_technicq[] = 'TransPD Rendezvous';

    // $cannulation_guidewire[] = '0.035 (Straight Tip)';
    // $cannulation_guidewire[] = '0.035 (Curve Tip)';
    // $cannulation_guidewire[] = '0.025 (Straight Tip)';
    // $cannulation_guidewire[] = '0.025 (Curve Tip)';
    // $cannulation_guidewire[] = '0.025 (Stiff wire, Straight tip)';
    // $cannulation_guidewire[] = '0.025 (Stiff wire, Curve tip)';
    // $cannulation_guidewire[] = '0.025 Navipro/Terumo';
    // $cannulation_guidewire[] = '0.018 (Straight Tip)';
    // $cannulation_guidewire[] = '0.018 (Curve Tip)';

    // $cannulation_outcome[] = 'None';
    // $cannulation_outcome[] = 'Success';
    // $cannulation_outcome[] = 'Fail';

    // $cannulation_compli[] = 'None';
    // $cannulation_compli[] = 'Bleeding (Massive)';
    // $cannulation_compli[] = 'Bleeding (Minimal)';
    // $cannulation_compli[] = 'Bleeding (Delay)';
    // $cannulation_compli[] = 'Perforation (Scope)';
    // $cannulation_compli[] = 'Perforation (Guidewire)';

    // $cannulation_complimanage[] = 'None';
    // $cannulation_complimanage[] = 'Observation';
    // $cannulation_complimanage[] = 'Adrenalin Injection';
    // $cannulation_complimanage[] = 'APC';
    // $cannulation_complimanage[] = 'Balloon Temponade';
    // $cannulation_complimanage[] = 'Clip';
    // $cannulation_complimanage[] = 'Emergency Rescue Lithotriptor';
    // $cannulation_complimanage[] = 'Endoloop';
    // $cannulation_complimanage[] = 'Endoscopic Necrosectomy/Debridement';
    // $cannulation_complimanage[] = 'Glue Injection';
    // $cannulation_complimanage[] = 'Gold Probe';
    // $cannulation_complimanage[] = 'Hemospray';
    // $cannulation_complimanage[] = 'Metalic Stent';
    // $cannulation_complimanage[] = 'NG';
    // $cannulation_complimanage[] = 'OVESCO';
    // $cannulation_complimanage[] = 'Plastic Stent';
    // $cannulation_complimanage[] = 'Re-Stenting';
    // $cannulation_complimanage[] = 'Remove Foreign Body';
    // $cannulation_complimanage[] = 'Rubber Band';
    // $cannulation_complimanage[] = 'Sclerosing Injection';
    // $cannulation_complimanage[] = 'Snare tip';

    // $cannulation_pdcannu[] = '1-2 times';
    // $cannulation_pdcannu[] = '3-4 times';
    // $cannulation_pdcannu[] = '≥ 5 times';

    // $cannulation_pdinjec[] = 'None';
    // $cannulation_pdinjec[] = 'Single';
    // $cannulation_pdinjec[] = 'Multiple';

    // $cannulation_prophy[] = 'Yes';
    // $cannulation_prophy[] = 'No';

    // $cannulation_amputype[] = 'Type I (Nipple)';
    // $cannulation_amputype[] = 'Type II (Behind Fold)';
    // $cannulation_amputype[] = 'Type III (Turtle)';
    // $cannulation_amputype[] = 'Type IIr (Wavy)';
    // $cannulation_amputype[] = 'Type IVa (Intra-Diverticular)';
    // $cannulation_amputype[] = 'Type IVb (Peri-vatarian)';
    // $cannulation_amputype[] = 'Type V (Bilateral Diverticulum)';
    // $cannulation_amputype[] = 'Type VI (Subpyrolic)';
    // $cannulation_amputype[] = 'Type Vllu (Ulcer)';
    // $cannulation_amputype[] = 'Type VIIm (Ampulla Mass)';
    // $cannulation_amputype[] = 'S/P Est (Non Virgin)';
    // $cannulation_amputype[] = 'Impact Stone';
    // $cannulation_amputype[] = 'Type VIlm+u (Mass c Ulcer)';

    // $cannulation_est[] = 'None';
    // $cannulation_est[] = 'Sphincterotomy';
    // $cannulation_est[] = 'Balloon Dilatation';
    // $cannulation_est[] = 'Combined';

    // $cannulation_route[] = 'Transampulla';
    // $cannulation_route[] = 'Trans-PTBD';
    // $cannulation_route[] = 'Transcholedochoduodenal fistula (CDS)';
    // $cannulation_route[] = 'Transhepaticogastric Fistula';
    // $cannulation_route[] = 'Transhepaticoduodenal Fistula';
    // $cannulation_route[] = 'Minor Ampulla';
    // $cannulation_route[] = 'Transcurtaneous (T-Tube)';
    // $cannulation_route[] = 'Trans-SEMs';
    // $cannulation_route[] = 'Trancutaneous (Fistula)';
    // $cannulation_route[] = 'Transhepatico-Jejunostomy (Trans-HJ)';

    // $cannulation_technicq[] = 'Guidewire First';
    // $cannulation_technicq[] = 'Contrast First';
    // $cannulation_technicq[] = 'Re-Guidewire after Contrast(Failed Guidewire)';
    // $cannulation_technicq[] = 'Double Guidewire';
    // $cannulation_technicq[] = 'Parallel PD Stent';
    // $cannulation_technicq[] = 'Rotatable Sphincterotome';
    // $cannulation_technicq[] = 'Ampulla Reposition (Biopsy)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Guidewire)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Clip)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Injection)';
    // $cannulation_technicq[] = 'Ampulla Reposition (Traction)';
    // $cannulation_technicq[] = 'Needle Knife Papillotomy';
    // $cannulation_technicq[] = 'Needle Knife Fistulotomy';
    // $cannulation_technicq[] = 'TransPD P-Cut';
    // $cannulation_technicq[] = 'Septotomy';
    // $cannulation_technicq[] = "Unroof Papillotomy (Bellringer's Technique)";
    // $cannulation_technicq[] = 'Transduodenal Rendezvous';
    // $cannulation_technicq[] = 'Transhepatic Rendezvous';
    // $cannulation_technicq[] = 'TransPD Rendezvous';

    // $cannulation_guidewire[] = '0.035 (Straight Tip)';
    // $cannulation_guidewire[] = '0.035 (Curve Tip)';
    // $cannulation_guidewire[] = '0.025 (Straight Tip)';
    // $cannulation_guidewire[] = '0.025 (Curve Tip)';
    // $cannulation_guidewire[] = '0.025 (Stiff wire, Straight tip)';
    // $cannulation_guidewire[] = '0.025 (Stiff wire, Curve tip)';
    // $cannulation_guidewire[] = '0.025 Navipro/Terumo';
    // $cannulation_guidewire[] = '0.018 (Straight Tip)';
    // $cannulation_guidewire[] = '0.018 (Curve Tip)';

    // $cannulation_outcome[] = 'None';
    // $cannulation_outcome[] = 'Success';
    // $cannulation_outcome[] = 'Fail';

    // $cannulation_compli[] = 'None';
    // $cannulation_compli[] = 'Bleeding (Massive)';
    // $cannulation_compli[] = 'Bleeding (Minimal)';
    // $cannulation_compli[] = 'Bleeding (Delay)';
    // $cannulation_compli[] = 'Perforation (Scope)';
    // $cannulation_compli[] = 'Perforation (Guidewire)';

    // $cannulation_complimanage[] = 'None';
    // $cannulation_complimanage[] = 'Observation';
    // $cannulation_complimanage[] = 'Adrenalin Injection';
    // $cannulation_complimanage[] = 'APC';
    // $cannulation_complimanage[] = 'Balloon Temponade';
    // $cannulation_complimanage[] = 'Clip';
    // $cannulation_complimanage[] = 'Emergency Rescue Lithotriptor';
    // $cannulation_complimanage[] = 'Endoloop';
    // $cannulation_complimanage[] = 'Endoscopic Necrosectomy/Debridement';
    // $cannulation_complimanage[] = 'Glue Injection';
    // $cannulation_complimanage[] = 'Gold Probe';
    // $cannulation_complimanage[] = 'Hemospray';
    // $cannulation_complimanage[] = 'Metalic Stent';
    // $cannulation_complimanage[] = 'NG';
    // $cannulation_complimanage[] = 'OVESCO';
    // $cannulation_complimanage[] = 'Plastic Stent';
    // $cannulation_complimanage[] = 'Re-Stenting';
    // $cannulation_complimanage[] = 'Remove Foreign Body';
    // $cannulation_complimanage[] = 'Rubber Band';
    // $cannulation_complimanage[] = 'Sclerosing Injection';
    // $cannulation_complimanage[] = 'Snare tip';

    // $cannulation_pdcannu[] = '1-2 times';
    // $cannulation_pdcannu[] = '3-4 times';
    // $cannulation_pdcannu[] = '≥ 5 times';

    // $cannulation_pdinjec[] = 'None';
    // $cannulation_pdinjec[] = 'Single';
    // $cannulation_pdinjec[] = 'Multiple';

    // $cannulation_prophy[] = 'Yes';
    // $cannulation_prophy[] = 'No';

    // $cannulation_amputype[] = 'Type I (Nipple)';
    // $cannulation_amputype[] = 'Type II (Behind Fold)';
    // $cannulation_amputype[] = 'Type III (Turtle)';
    // $cannulation_amputype[] = 'Type IIr (Wavy)';
    // $cannulation_amputype[] = 'Type IVa (Intra-Diverticular)';
    // $cannulation_amputype[] = 'Type IVb (Peri-vatarian)';
    // $cannulation_amputype[] = 'Type V (Bilateral Diverticulum)';
    // $cannulation_amputype[] = 'Type VI (Subpyrolic)';
    // $cannulation_amputype[] = 'Type Vllu (Ulcer)';
    // $cannulation_amputype[] = 'Type VIIm (Ampulla Mass)';
    // $cannulation_amputype[] = 'S/P Est (Non Virgin)';
    // $cannulation_amputype[] = 'Impact Stone';
    // $cannulation_amputype[] = 'Type VIlm+u (Mass c Ulcer)';

    // $cannulation_est[] = 'None';
    // $cannulation_est[] = 'Sphincterotomy';
    // $cannulation_est[] = 'Balloon Dilatation';
    // $cannulation_est[] = 'Combined';

    $cannulation_dilationform[] = '12 fr (4 mm)';
    $cannulation_dilationform[] = '18 fr (6 mm)';
    $cannulation_dilationform[] = '21 fr (7 mm)';
    $cannulation_dilationform[] = '24 fr (8 mm)';
    $cannulation_dilationform[] = '27 fr (9 mm)';
    $cannulation_dilationform[] = '30 fr (10 mm)';
    $cannulation_dilationform[] = '33 fr (11 mm)';
    $cannulation_dilationform[] = '36 fr (12 mm)';
    $cannulation_dilationform[] = '39 fr (13 mm)';
    $cannulation_dilationform[] = '42 fr (14 mm)';
    $cannulation_dilationform[] = '45 fr (15 mm)';
    $cannulation_dilationform[] = '48 fr (16 mm)';
    $cannulation_dilationform[] = '51 fr (17 mm)';
    $cannulation_dilationform[] = '53 fr (18 mm)';
    $cannulation_dilationform[] = '56 fr (19 mm)';
    $cannulation_dilationform[] = '60 fr (20 mm)';

    $cannulation_dilationto[] = '12 fr (4 mm)';
    $cannulation_dilationto[] = '18 fr (6 mm)';
    $cannulation_dilationto[] = '21 fr (7 mm)';
    $cannulation_dilationto[] = '24 fr (8 mm)';
    $cannulation_dilationto[] = '27 fr (9 mm)';
    $cannulation_dilationto[] = '30 fr (10 mm)';
    $cannulation_dilationto[] = '33 fr (11 mm)';
    $cannulation_dilationto[] = '36 fr (12 mm)';
    $cannulation_dilationto[] = '39 fr (13 mm)';
    $cannulation_dilationto[] = '42 fr (14 mm)';
    $cannulation_dilationto[] = '45 fr (15 mm)';
    $cannulation_dilationto[] = '48 fr (16 mm)';
    $cannulation_dilationto[] = '51 fr (17 mm)';
    $cannulation_dilationto[] = '53 fr (18 mm)';
    $cannulation_dilationto[] = '56 fr (19 mm)';
    $cannulation_dilationto[] = '60 fr (20 mm)';

    $cannu = [];
    if (isset($case->fidingtemp['cannulation'])) {
        $cannu = $case->fidingtemp['cannulation'];
    }

@endphp


<div class="card" style="margin: 4px;">
    <div class="card-header " style="border-bottom: 1px solid #9599AD">
        <div class="row">
            <div class="col-12 fw-bold h5">
                &ensp; Advance ERCP
            </div>
        </div>
    </div>
    <div class="card-body">
        {{-- <button type="submit">TEST</button> --}}
        <div class="col-12 ps-3">
            <b>Cannulation</b>
            <div class="ms-2 pt-2">

                <input class="form-check-input toggle_content" @checked(isset($cannu['cbdcannulation'])) type="checkbox"
                    id="formCheck1" name="cannulation_cbdcannulation" value="CBD Cannulation">
                <label class="form-check-label" for="formCheck1">
                    CBD Cannulation
                </label>
            </div>
            <div class="row px-2 py-3 mt-3 ">
                <div class="custom_cardbox px-0">
                    <div class="bg-greenfade w-100 p-2">
                        <div class="row ">
                            <div class="col-lg-8 ">
                                <div class="row">
                                    <div class="col-4"> &ensp; Route</div>
                                    <div class="col-4">&nbsp; Technique</div>
                                    <div class="col-2">
                                        Guidewire
                                    </div>
                                    <div class="col-2">
                                        Outcome
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 ">
                                <div class="row">
                                    <div class="col-5">Complication</div>
                                    <div class="col-7">
                                        <div class="row">
                                            <div class="col-9">
                                                Complication Management
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cannulation mt-2">
                        @forelse ($cannu['g1']??[] as $data)
                            <div class="row px-3 py-2 advance">
                                <div class="col-lg-8">
                                    <div class="row main">
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_route_g1', $cannulation_route, $data['route'] ?? '') !!}
                                            {{-- <input type="hidden" name="cannulation_routeand_g1[]" value="and"> --}}
                                        </div>
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_technicq_g1', $cannulation_technicq, $data['technicq'] ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_guidewire_g1', $cannulation_guidewire, $data['guidewire'] ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_outcome_g1', $cannulation_outcome, $data['outcome'] ?? '') !!}
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4">
                                    <div class="row">
                                        <div class="col-5">
                                            {!! selectadvanced('cannulation_compli_g1', $cannulation_compli, $data['compli'] ?? '') !!}
                                        </div>
                                        <div class="col-6">
                                            {!! selectadvanced('cannulation_complimanage_g1', $cannulation_complimanage, $data['complimanage'] ?? '') !!}
                                        </div>
                                        <div class="col-1 align-self-center">
                                            <a type="button" class="btn-transparent btn-danger btn-cancel remove"><i
                                                    class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @empty
                            <div class="row px-3 py-2 advance">
                                <div class="col-lg-8">
                                    <div class="row main">
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_route_g1', $cannulation_route, $save ?? '') !!}
                                            {{-- <input type="hidden" name="cannulation_routeand_g1[]" value="and"> --}}
                                        </div>
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_technicq_g1', $cannulation_technicq, $save ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_guidewire_g1', $cannulation_guidewire, $save ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_outcome_g1', $cannulation_outcome, $save ?? '') !!}
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4">
                                    <div class="row">
                                        <div class="col-5">
                                            {!! selectadvanced('cannulation_compli_g1', $cannulation_compli, $save ?? '') !!}
                                        </div>
                                        <div class="col-6">
                                            {!! selectadvanced('cannulation_complimanage_g1', $cannulation_complimanage, $save ?? '') !!}
                                        </div>
                                        <div class="col-1 align-self-center">
                                            <a type="button" class="btn-transparent btn-danger btn-cancel remove"><i
                                                    class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforelse
                    </div>

                    <div class="col-12 p-2 text-end ">
                        <a class="btn btn-soft-secondary w-lg btn_addlesson_cbd01 ">+ Add </a>
                    </div>


                    {{-- -------------------------------------------------------------------------- --}}



                    <div class="bg-greenfade w-100 p-2">
                        <div class="row">
                            <div class="col-lg-8 ">
                                <div class="row">
                                    <div class="col-4">
                                        <div class="row">
                                            <div class="col-lg-4">
                                                PD Cannulation
                                            </div>
                                            <div class="col-lg-4">
                                                &ensp; PD Injection
                                            </div>
                                            <div class="col-lg-4 text-nowrap">
                                                Prophylaxis PD Stent
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4"> &ensp;&ensp;&ensp;&ensp;&ensp;Ampulla Type</div>
                                    <div class="col-4">
                                        Est Technique
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 ">
                                <div class="row">
                                    <div class="col-7">
                                        <div class="row">
                                            <div class="col-6">
                                                Dilate From

                                            </div>
                                            <div class="col-6">
                                                Dilate to
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-5">
                                        Ampulla Biopsy
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cannulation1 mt-2">
                        @forelse ($cannu['g1']??[] as $data)
                            <div class="row  px-3 py-2 advance">
                                <div class="row">
                                    <div class="col-8 ">
                                        <div class="row">
                                            <div class="col-4">
                                                <div class="row">
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdcannu_g1', $cannulation_pdcannu, $data['pdcannu'] ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdinjec_g1', $cannulation_pdinjec, $data['pdinjec'] ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_prophy_g1', $cannulation_prophy, $data['prophy'] ?? '') !!}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_amputype_g1', $cannulation_amputype, $data['amputype'] ?? '') !!}
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_est_g1', $cannulation_est, $data['est'] ?? '') !!}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4 ">
                                        <div class="row">
                                            <div class="col-7">
                                                <div class="row">
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationform_g1', $cannulation_dilationform, $data['dilationform'] ?? '') !!}

                                                    </div>
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationto_g1', $cannulation_dilationto, $data['dilationto'] ?? '') !!}

                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                <input type="text" class="form-control"
                                                    name="cannulation_txtampullar_g1[]"
                                                    value="{{ @$data['txtampullar'] }}">
                                            </div>
                                            <div class="col-1 align-self-center">
                                                <a type="button"
                                                    class="btn-transparent btn-danger btn-cancel remove"><i
                                                        class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @empty
                            <div class="row  px-3 py-2">
                                <div class="row">
                                    <div class="col-8 ">
                                        <div class="row">
                                            <div class="col-4">
                                                <div class="row">
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdcannu_g1', $cannulation_pdcannu, $save ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdinjec_g1', $cannulation_pdinjec, $save ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_prophy_g1', $cannulation_prophy, $save ?? '') !!}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_amputype_g1', $cannulation_amputype, $save ?? '') !!}
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_est_g1', $cannulation_est, $save ?? '') !!}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4 ">
                                        <div class="row">
                                            <div class="col-7">
                                                <div class="row">
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationform_g1', $cannulation_dilationform, $save ?? '') !!}

                                                    </div>
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationto_g1', $cannulation_dilationto, $save ?? '') !!}

                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                <input type="text" class="form-control"
                                                    name="cannulation_txtampullar_g1[]">
                                            </div>
                                            <div class="col-1 align-self-center">
                                                <a type="button"
                                                class="btn-transparent btn-danger btn-cancel remove"><i
                                                    class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforelse
                    </div>
                    <div class="col-12 p-2 text-end ">
                        <a class="btn btn-soft-secondary w-lg btn_addlesson_cbd02">+ Add</a>
                    </div>
                </div>
            </div>

            {{-- --------------------------------------------------------------------------------------- --}}

            <div class="ms-2 pt-2">
                <input class="form-check-input" @checked(isset($cannu['pdcannulation'])) type="checkbox" id="formCheck2"
                    name="cannulation_pdcannulation" value="PD Cannulation">
                <label class="form-check-label" for="formCheck2">
                    PD Cannulation
                </label>
            </div>
            <div class="row px-2 py-3 mt-3 advance ">
                <div class="custom_cardbox px-0">
                    <div class="bg-greenfade w-100 p-2">
                        <div class="row ">
                            <div class="col-lg-8 ">
                                <div class="row">
                                    <div class="col-4"> &ensp; Route</div>
                                    <div class="col-4">&nbsp; Technique</div>
                                    <div class="col-2">
                                        Guidewire
                                    </div>
                                    <div class="col-2">
                                        Outcome
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 ">
                                <div class="row">
                                    <div class="col-5">Complication</div>
                                    <div class="col-7">
                                        <div class="row">
                                            <div class="col-9">
                                                Complication Management
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cannulation2 mt-2">
                        @forelse ($cannu['g2'] ?? [] as $data2)
                            <div class="row px-3 py-2 advance">
                                <div class="col-lg-8">
                                    <div class="row main">
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_route_g2', $cannulation_route, $data2['route'] ?? '') !!}
                                            {{-- <input type="hidden" name="cannulation_routeand_g2[]" value="and"> --}}
                                        </div>
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_technicq_g2', $cannulation_technicq, $data2['technicq'] ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_guidewire_g2', $cannulation_guidewire, $data2['guidewire'] ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_outcome_g2', $cannulation_outcome, $data2['outcome'] ?? '') !!}
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4">
                                    <div class="row">
                                        <div class="col-5">
                                            {!! selectadvanced('cannulation_compli_g2', $cannulation_compli, $data2['compli'] ?? '') !!}
                                        </div>
                                        <div class="col-6">
                                            {!! selectadvanced('cannulation_complimanage_g2', $cannulation_complimanage, $data2['complimanage'] ?? '') !!}
                                        </div>
                                        <div class="col-1 align-self-center">
                                            <a type="button" class="btn-transparent btn-danger btn-cancel remove"><i
                                                    class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @empty
                            <div class="row px-3 py-2 advance">
                                <div class="col-lg-8">
                                    <div class="row main">
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_route_g2', $cannulation_route, $save ?? '') !!}
                                            {{-- <input type="hidden" name="cannulation_routeand_g2[]" value="and"> --}}
                                        </div>
                                        <div class="col-4">
                                            {!! selectadvanced('cannulation_technicq_g2', $cannulation_technicq, $save ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_guidewire_g2', $cannulation_guidewire, $save ?? '') !!}
                                        </div>
                                        <div class="col-2">
                                            {!! selectadvanced('cannulation_outcome_g2', $cannulation_outcome, $save ?? '') !!}
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4">
                                    <div class="row">
                                        <div class="col-5">
                                            {!! selectadvanced('cannulation_compli_g2', $cannulation_compli, $save ?? '') !!}
                                        </div>
                                        <div class="col-6">
                                            {!! selectadvanced('cannulation_complimanage_g2', $cannulation_complimanage, $save ?? '') !!}
                                        </div>
                                        <div class="col-1 align-self-center">
                                            <a type="button" class="btn-transparent btn-danger btn-cancel remove"><i
                                                    class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforelse
                    </div>
                    <div class="col-12 p-2 text-end ">
                        <a class="btn btn-soft-secondary w-lg btn_addlesson_pd01">+ Add</a>
                    </div>
                    {{-- ---------------------------------------------------------------------------------- --}}
                    <div class="bg-greenfade w-100 p-2">
                        <div class="row">
                            <div class="col-lg-8 ">
                                <div class="row">
                                    <div class="col-4">
                                        <div class="row">
                                            <div class="col-lg-4">
                                                PD Cannulation
                                            </div>
                                            <div class="col-lg-4">
                                                &ensp; PD Injection
                                            </div>
                                            <div class="col-lg-4 text-nowrap">
                                                Prophylaxis PD Stent
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4"> &ensp;&ensp;&ensp;&ensp;&ensp;Ampulla Type</div>
                                    <div class="col-4">
                                        Est Technique
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 ">
                                <div class="row">
                                    <div class="col-7">
                                        <div class="row">
                                            <div class="col-6">
                                                Dilate From

                                            </div>
                                            <div class="col-6">
                                                Dilate to
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-5">
                                        Ampulla Biopsy
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cannulation3 mt-2">
                        @forelse ($cannu['g2'] ?? [] as $data3)
                            <div class="row  px-3 py-2 advance">
                                <div class="row">
                                    <div class="col-8 ">
                                        <div class="row">
                                            <div class="col-4">
                                                <div class="row">
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdcannu_g2', $cannulation_pdcannu, $data3['pdcannu'] ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdinjec_g2', $cannulation_pdinjec, $data3['pdinjec'] ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_prophy_g2', $cannulation_prophy, $data3['prophy'] ?? '') !!}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_amputype_g2', $cannulation_amputype, $data3['amputype'] ?? '') !!}
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_est_g2', $cannulation_est, $data3['est'] ?? '') !!}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4 ">
                                        <div class="row">
                                            <div class="col-7">
                                                <div class="row">
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationform_g2', $cannulation_dilationform, $data3['dilationform'] ?? '') !!}
                                                    </div>
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationto_g2', $cannulation_dilationto, $data3['dilationto'] ?? '') !!}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                <input type="text" class="form-control"
                                                    name="cannulation_txtampullar_g2[]"
                                                    value="{{ @$data3['txtampullar'] }}">
                                            </div>
                                            <div class="col-1 align-self-center">
                                                <a type="button"
                                                    class="btn-transparent btn-danger btn-cancel remove"><i
                                                        class="ri-indeterminate-circle-fill ri-lg"></i></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @empty
                            <div class="row  px-3 py-2 advance">
                                <div class="row">
                                    <div class="col-8 ">
                                        <div class="row">
                                            <div class="col-4">
                                                <div class="row">
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdcannu_g2', $cannulation_pdcannu, $save ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_pdinjec_g2', $cannulation_pdinjec, $save ?? '') !!}
                                                    </div>
                                                    <div class="col-4">
                                                        {!! selectadvanced('cannulation_prophy_g2', $cannulation_prophy, $save ?? '') !!}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_amputype_g2', $cannulation_amputype, $save ?? '') !!}
                                            </div>
                                            <div class="col-4">
                                                {!! selectadvanced('cannulation_est_g2', $cannulation_est, $save ?? '') !!}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-4 ">
                                        <div class="row">
                                            <div class="col-7">
                                                <div class="row">
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationform_g2', $cannulation_dilationform, $save ?? '') !!}
                                                    </div>
                                                    <div class="col-6">
                                                        {!! selectadvanced('cannulation_dilationto_g2', $cannulation_dilationto, $save ?? '') !!}

                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-4">
                                                <input type="text" class="form-control"
                                                    name="cannulation_txtampullar_g2[]">
                                            </div>
                                            <div class="col-1 align-self-center">
                                                <a type="button"
                                                    class="btn-transparent btn-danger btn-cancel remove"><i
                                                        class="ri-indeterminate-circle-fill ri-lg"></i></a>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforelse
                    </div>
                    <div class="col-12 p-2 text-end ">
                        <a class="btn btn-soft-secondary w-lg btn_addlesson_pd02">+ Add</a>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>


{{--
<script>
    $(".toggle_content").click(function(){
        $(".cannu_content").toggle(300)
    })
</script> --}}
