<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Dashboard</title>

    <script src="https://www.gstatic.com/firebasejs/5.7.0/firebase.js"></script>




    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

    <!--Import Google Icon Font-->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">


    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="/test/materialize/css/materialize.min.css">

    <!-- Compiled and minified JavaScript -->
    <script src="/test/materialize/js/materialize.min.js"></script>

    <link rel="stylesheet" href="test/style.css">


</head>

<body>
    <div class="myapp">
        <nav>
            <div class="nav-wrapper red darken-1">
                <a class="brand-logo">{{title}}</a>
                <ul id="nav-mobile" class="right hide-on-med-and-down">
                    <li><a href="sass.html">Done Purchases</a></li>
                    <li><a href="/scan">Scan bill</a></li>
                    <li class="nav-createlist"><a>Create Shoppinglist</a></li>
                </ul>
            </div>
        </nav>


        <div class="container row">
            <div class="col s6">
                <ul class="collection with-header">
                    <li class="collection-header">
                        <h4>Your Shoppinglists</h4>
                    </li>
                    <li class="collection-item citemL" v-for="item in myshoppinglists">
                        <div v-on:click="getShoppinglistDetail(item.sl_id)">{{item.name}}<a href="#!"
                                class="secondary-content"><i v-on:click="deleteShoppinglist(item.sl_id)"
                                    class="material-icons ico">delete</i> <i class="material-icons ico">edit</i></a>
                        </div>
                    </li>

                </ul>


                <ul class="collection with-header">
                    <li class="collection-header">
                        <h4>Shared Shoppinglists</h4>
                    </li>
                    <li class="collection-item citemL" v-for="item in sharedshoppinglists">
                        <div>{{item.name}}<a href="#!" class="secondary-content"><i
                                    class="material-icons ico">remove_circle_outline</i></a></div>
                    </li>

                </ul>

            </div>

            <!-- etainansicht -->
            <div class="col s6">

                <ul class="collapsible">
                    <li v-for="group in currentlist.groups">
                        <div class="collapsible-header"><i class="material-icons">view_list</i>{{group.name}}</div>
                        <div class="collapsible-body"><span>

                                <div class="collection">
                                    <a  class="collection-item msl" v-for="item in group.content">{{item.name}}</a>
                                </div>

                            </span></div>
                    </li>
                </ul>
            </div>

        </div>


        <div id="modal1" class="modal">
            <div class="modal-content">
                <h4>Create new Shoppinglist</h4>

                <input id="sl_name" type="text" class="validate" v-model="name">
                <label class="active" for="sl_desc">Name</label>

                <input id="sl_name" type="text" class="validate" v-model="description">
                <label class="active" for="sl_desc">Description</label>

            </div>
            <div class="modal-footer">
                <a href="#!" class="modal-close waves-effect waves-green btn-flat" v-on:click="createShoppinglist(name, description)">Create</a>
            </div>
        </div>



    </div>

    <script src="/test/vue.js"></script>
    <script src="/ocrscan/axios.js"></script>

    <script src="/test/dash.js"></script>
</body>

</html>