<div ng-controller="Umbraco.Editors.DataType.CreateController">

    <div ng-show="!model.creatingFolder">
        <div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
            <div class="umb-pane">
                <h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>

                <ul class="umb-actions umb-actions-child">
                    <li data-element="action-data-type" class="umb-action">
                        <button type="button" class="umb-action-link umb-outline btn-reset" ng-click="createDataType()" umb-auto-focus>
                            <umb-icon icon="icon-autofill" class="icon large"></umb-icon>
                            <span class="menu-label">
                                <localize key="create_newDataType">New data type</localize>
                            </span>
                        </button>
                    </li>
                    <li data-element="action-folder" class="umb-action">
                        <button type="button" class="umb-action-link umb-outline btn-reset" ng-click="showCreateFolder()">
                            <umb-icon icon="icon-folder" class="icon large"></umb-icon>
                            <span class="menu-label">
                                <localize key="create_newFolder">New folder</localize>...
                            </span>
                        </button>
                    </li>
                </ul>
            </div>

        </div>

        <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
            <button type="button" class="btn btn-info" ng-click="close()">
                <localize key="buttons_somethingElse">Do something else</localize>
            </button>
        </div>
    </div>

    <div ng-show="model.creatingFolder">
        <form novalidate name="createFolderForm"
              ng-submit="createContainer()"
              val-form-manager>
            <div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
                <div class="umb-pane" ng-show="model.creatingFolder">
                    <umb-control-group label="Enter a folder name" hide-label="false">
                        <input type="text"
                               name="folderName"
                               ng-model="model.folderName"
                               class="umb-textstring textstring input-block-level"
                               focus-when="{{model.creatingFolder}}"
                               required />
                    </umb-control-group>
                </div>
            </div>
            <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
                <umb-button type="button"
                            button-style="link"
                            action="close()"
                            label-key="general_close">
                </umb-button>
                <umb-button type="submit"
                            button-style="primary"
                            label-key="general_create">
                </umb-button>
            </div>
        </form>
    </div>
</div>
