Com.Frog.Utils.require(
    '//package/widgets/A7A678192001BB59D63CFFC862C4F50C3ED2D80CE0D91D17/assets/styles/main.css',
    '//package/widgets/A7A678192001BB59D63CFFC862C4F50C3ED2D80CE0D91D17/assets/views/main.ejs',
    '//package/widgets/A7A678192001BB59D63CFFC862C4F50C3ED2D80CE0D91D17/widget.ejs'
).then(function() {
    Com.Frog.Controllers.Widget.extend('Widget.Padlet', {
    }, {
        prefs: {
            embed: {
                type: 'textarea',
                label: 'Paste embed code from Padlet here',
                defaultValue :''
            },
            height: {
                type: 'number',
                label: 'Height',
                showUnits: 'px',
                defaultValue: 608
            }
        },

        packageID: 'A7A678192001BB59D63CFFC862C4F50C3ED2D80CE0D91D17',

        init: function() {},


        'widget.live': function(el, ev, data) {
            this.element.html(
                this.view('main.ejs')
            );
            if (this.prefs.height.value !== '') {
                this.element.find('iframe').css('height',this.prefs.height.value+'px');
            }
        },

        'widget.edit': function(el, ev, data) {
            this.element.html(
                this.view('./widget.ejs')
            );
        },


        'widget.updated': function(el, ev, data) {}
    });
});
