import $ from 'jquery';
global.$ = $;

import '../css/app.scss';
import 'bootstrap';
import 'font-awesome/css/font-awesome.css';
import 'jquery-ui/themes/base/all.css';
import 'jquery-ui/ui/widgets/autocomplete';
import 'bootstrap-notify/bootstrap-notify';
import 'animate.css/animate.css';
import 'bootstrap-star-rating';
import 'bootstrap-star-rating/css/star-rating.css';
import 'bootstrap-star-rating/themes/krajee-fa/theme';
import 'bootstrap-star-rating/themes/krajee-fa/theme.css';
import './suivifilms2';
import './addCollectionWidget';
import './filtrenotes';
import './filtre';

import '../filtrify/js/filtrify';
import '../filtrify/css/filtrify.css'

$(document).ready(function() {
    $(function() {
        $.filtrify("tableFilms", "placeHolder");

        $('#filtre').on("keyup", function () {
            $(this).filtre();
        });

        $('[data-toggle="tooltip"]').tooltip();

        $('.add-another-collection-widget').addCollection();

        $('[data-fonction="switch"]').switchEtat();

        $('[data-toggle="star-filter"]').filtreNote();

        $('[data-toggle="notify"]').each(function() {
            $.notify({
                message: $(this).data('message')
            },{
                type: $(this).data('type'),
                animate: {
                    enter: 'animated fadeInRight',
                    exit: 'animated fadeOutRight'
                },
                delay: 4000,
                offset: {
                    x: 15,
                    y: 70
                }
            })
        })
    })
})