{{-- Layout Reference --}}
@extends('Limitless::Help.Layout.Master')

@section('Limitless::Content')


    {{-- Description --}}
    @Limitless::ElementCardStart(['title' => "Modal", 'icon' => 'icon-stack'])
        <p>A styled popup container for dialogs.</p>
    @Limitless::ElementCardStop

    {{-- Elements --}}
    @Limitless::ElementCardStart(['title' => "Fragments", 'icon' => 'icon-grid5'])

        <div class="bg-dark rounded py-2 px-3 mb-3">
            <h6 class="mb-0 font-weight-semibold">ModalStart</h6>
            <p class="mb-3 text-muted">The opening fragment of the modal element.</p>
            <p class="font-italic font-size-lg">Parameters</p>
            <div class="row mt-2">
                @Limitless::TableStart([ 'extra' => ['class' => 'table table-xs table-striped'] ])

                    @Limitless::TableAutofillHeader([
                        ['name' => 'Key'],
                        ['name' => 'Type'],
                        ['name' => 'Description']
                    ])

                    @Limitless::TableAutofillBody([
                        [
                            ['value' => 'param'],
                            ['value' => '<i>String</i> [Default = <code>"No Title"</code>]', 'secure' => false],
                            ['value' => 'desc here.']
                        ]
                    ])
                @Limitless::TableStop
            </div>
        </div>

        <div class="bg-dark rounded py-2 px-3 mb-3">
            <h6 class="mb-0 font-weight-semibold">ModalStop</h6>
            <p class="mb-3 text-muted">The closing fragment of the modal element.</p>
            <p class="font-italic font-size-lg">Parameters</p> NONE
        </div>

    @Limitless::ElementCardStop

    @Limitless::ElementCardStart(['title' => "Events", 'icon' => 'icon-power2' ] )

    @Limitless::ElementCardStop

    {{-- Sample Output --}}
    @Limitless::ElementCardStart(['title' => "Sample Output", 'icon' => 'icon-display4' ] )

        {{-- Modals --}}
        @Limitless::ModalStart(['id' => 'modal_lg_test', 'title' => 'Modal Large Sample', 'icon' => 'icon-menu7', 'size' => 'lg'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 50])
                @Limitless::Divider
                @Limitless::LoremIpsum(['length' => 100])
            @Limitless::ModalBodyStop
            @Limitless::ModalFooterStart
                <button class="btn btn-link" data-dismiss="modal"><i class="icon-cross2 font-size-base mr-1"></i> Close</button>
                <button class="btn bg-primary"><i class="icon-checkmark3 font-size-base mr-1"></i> Okay</button>
            @Limitless::ModalFooterStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_xs_test', 'title' => 'Modal Extra Small', 'icon' => 'icon-menu7', 'size' => 'xs'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_scrollable_test', 'title' => 'Modal Scrollable', 'icon' => 'icon-menu7', 'size' => 'xs', 'scrollable' => true])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 500])
            @Limitless::ModalBodyStop
            @Limitless::ModalFooterStart(['scrollable' => true])
                <button class="btn btn-link" data-dismiss="modal"><i class="icon-cross2 font-size-base mr-1"></i> Close</button>
                <button class="btn bg-primary"><i class="icon-checkmark3 font-size-base mr-1"></i> Okay</button>
            @Limitless::ModalFooterStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_backdrop_test', 'title' => 'Modal No Backdrop', 'icon' => 'icon-menu7', 'backdrop' => false ])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_keyboard_test', 'title' => 'Modal No Keyboard Interaction', 'icon' => 'icon-menu7', 'keyboard' => false ])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_no_animation_test', 'title' => 'Modal No Animation', 'icon' => 'icon-menu7', 'animate' => false ])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 50])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_onshow', 'title' => 'Modal Extra Small', 'icon' => 'icon-menu7', 'size' => 'xs'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        {{-- Modal Events--}}
        @Limitless::ModalStart(['id' => 'modal_onshown', 'title' => 'Modal Extra Small', 'icon' => 'icon-menu7', 'size' => 'xs'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_onhide', 'title' => 'Modal Extra Small', 'icon' => 'icon-menu7', 'size' => 'xs'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        @Limitless::ModalStart(['id' => 'modal_onhidden', 'title' => 'Modal Extra Small', 'icon' => 'icon-menu7', 'size' => 'xs'])
            @Limitless::ModalBodyStart
                @Limitless::LoremIpsum(['length' => 20])
            @Limitless::ModalBodyStop
        @Limitless::ModalStop

        {{-- Modal buttons --}}
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_lg_test">Large modal</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_xs_test">Extra small modal</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_scrollable_test">Scrollable modal</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_backdrop_test">No backdrop modal</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_keyboard_test">No keyboard interaction modal</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_no_animation_test">No animation modal</button>

        @Limitless::Divider

        {{-- Modal event buttons --}}
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_onshow">Fire modal event onShow</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_onshown">Fire modal event onShown</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_onhide">Fire modal event onHide</button>
        <button type="button" class="btn btn-light mb-1" data-toggle="modal" data-target="#modal_onhidden">Fire modal event onHidden</button>


    @Limitless::ElementCardStop

    @php
        $example = base64_decode(" ");
    @endphp

    {{-- Sample Code --}}
    @Limitless::ElementCardStart(['title' => "Sample Code", 'icon' => 'icon-circle-code' ] )
        @Limitless::Codemirror([ 'language' => 'javascript', 'theme' => 'zenburn', 'value' => $example ])
    @Limitless::ElementCardStop



@stop
