<div ng-controller="Umbraco.PropertyEditors.GridPrevalueEditor.ConfigController as vm">

    <umb-editor-view>

        <umb-editor-header
            name="model.title"
            name-locked="true"
            hide-alias="true"
            hide-icon="true"
            hide-description="true">
        </umb-editor-header>

        <umb-editor-container>
            <ng-form name="gridItemConfigEditor" val-form-manager>

                <umb-empty-state position="center" ng-if="vm.showEmptyState">
                    <localize key="grid_noConfiguration">No further configuration available</localize>
                </umb-empty-state>

                <umb-box ng-if="vm.showConfig">
                    <umb-box-header title-key="grid_settings"></umb-box-header>
                    <umb-box-content>
                        <div>
                            <umb-property property="configValue"
                                          ng-repeat="configValue in model.config">
                                <umb-property-editor model="configValue" is-pre-value="true"></umb-property-editor>
                            </umb-property>
                        </div>
                    </umb-box-content>
                </umb-box>

                <umb-box ng-if="vm.showStyles">
                    <umb-box-header title-key="grid_styles"></umb-box-header>
                    <umb-box-content>
                        <div>
                            <umb-property property="styleValue"
                                          ng-repeat="styleValue in model.styles">
                                <umb-property-editor model="styleValue" is-pre-value="true"></umb-property-editor>
                            </umb-property>
                        </div>
                    </umb-box-content>
                </umb-box>

            </ng-form>
        </umb-editor-container>

        <umb-editor-footer>
            <umb-editor-footer-content-right>
                <umb-button type="button"
                            button-style="link"
                            label-key="general_close"
                            shortcut="esc"
                            action="vm.close()">
                </umb-button>
                <umb-button ng-if="vm.showConfig || vm.showStyles"
                            type="button"
                            button-style="success"
                            label-key="general_submit"
                            action="vm.submit()">
                </umb-button>
            </umb-editor-footer-content-right>
        </umb-editor-footer>

    </umb-editor-view>

</div>
