<template>

    <div class="uk-grid pk-grid-large pk-width-sidebar-large" data-uk-grid-margin>
        <div class="pk-width-content uk-form-stacked">

            <div class="uk-form-row">

                <input class="uk-width-1-1 uk-form-large" type="text" name="title" :placeholder="'Enter Title' | trans" v-model="widget.title" v-validate:required>
                <p class="uk-form-help-block uk-text-danger" v-show="form.title.invalid">{{ 'Title cannot be blank.' | trans }}</p>

            </div>

            <div class="uk-form-row">
                <v-editor :value.sync="widget.data.content" :options="{markdown : widget.data.markdown}"></v-editor>
                <p>
                    <label><input type="checkbox" v-model="widget.data.markdown"> {{ 'Enable Markdown' | trans }}</label>
                </p>
            </div>

        </div>
        <div class="pk-width-sidebar">

            <partial name="settings"></partial>

        </div>
    </div>

</template>

<script>

    module.exports = {

        section: {
            label: 'Settings'
        },

        props: ['widget', 'config'],

        created: function () {
            this.$options.partials = this.$parent.$options.partials;
        }

    };

    window.Widgets.components['system-text:settings'] = module.exports;

</script>
