<section class="storage-actions">
  <div ng-if="$ctrl.selectObjects.length === 0"
    class="storage-actions__no-selection">
    No selection
  </div>

  <div ng-if="$ctrl.selectedMode ==='create'"
    class="storage-actions__create-folder">
    <div class="storage-actions__create-folder-title">
      New Folder
    </div>
    <div class="storage-actions__create-folder-edit">
      <input type="text"
        ng-model="$ctrl.editObjName"
        id="edit"
        ng-keyup="$ctrl.preSaveCreateFolder($event)">
      <md-button class="md-icon-button ok" 
        ng-if="$ctrl.editObjName.length > 0"
        ng-click="$ctrl.runSaveEditFolder()"
        aria-label="save created folder">
        <ng-md-icon icon="done" size="18"></ng-md-icon>
      </md-button>
      <md-button class="md-icon-button cancel" 
        ng-click="$ctrl.cancelCreateFolder()"
        aria-label="cancel created folder">
        <ng-md-icon icon="clear" size="18"></ng-md-icon>
      </md-button>
    </div>
  </div>

  <div ng-if="$ctrl.selectedMode !== 'create' && $ctrl.selectObjects.length > 0"
    class="storage-actions__show">
    <div class="storage-actions__show-title">
        <md-button class="md-icon-button" 
          aria-label="close"
          ng-click="$ctrl.clearSelected()">
          <ng-md-icon icon="close"></ng-md-icon>
        </md-button>
        {{$ctrl.selectObjects.length}} {{$ctrl.selectObjects.length === 1 ? 'object' : 'objects'}}
    </div>

    <div ng-if="$ctrl.selectObjects.length === 1"
      class="storage-actions__show-single">
      <div>
        <div class="storage-actions__show-single--label">
          {{$ctrl.selectObjects[0].type === 'folder' ? 'Foldername:' : $ctrl.selectObjects[0].type === 'file' ? 'Filename:' : 'Linkname:'}}
        </div>
        <div class="storage-actions__show-single--text">
          {{$ctrl.selectObjects[0].name}}
        </div>
      </div>
      <div>
        <div class="storage-actions__show-single--label inline">
          Date:
        </div>
        <div class="storage-actions__show-single--text inline">
          {{ $ctrl.showDate($ctrl.selectObjects[0].date) }}
        </div>
      </div>
      <div>
        <div class="storage-actions__show-single--label inline">
          Owner:
        </div>
        <div class="storage-actions__show-single--text inline">
          me
        </div>
      </div>
      <div>
        <div class="storage-actions__show-single--label inline">
          Size:
        </div>
        <div class="storage-actions__show-single--text inline">
          {{ $ctrl.showSize($ctrl.selectObjects[0].size) }}
        </div>
      </div>
    </div>

    <div class="storage-actions__show-btns">
      <md-button class="md-raised primary" aria-label="select_all" ng-click="$ctrl.runAction('select_all')">
        {{ $ctrl.areSelectAll ? 'DESELECT ALL' : 'SELECT ALL' }}
      </md-button>
      <md-button class="md-raised primary" aria-label="copy" ng-click="$ctrl.runAction('copy')">
        COPY / MOVE TO
      </md-button>
      <md-button class="md-raised primary" aria-label="share" ng-click="$ctrl.runAction('share')" ng-disabled="true">
        SHARE
      </md-button>
      <md-button class="md-raised primary" aria-label="send" ng-click="$ctrl.runAction('send')">
        SEND
      </md-button>
      <md-button class="md-raised primary" aria-label="download" ng-click="$ctrl.runAction('download')">
        DOWNLOAD
      </md-button>
      <md-button class="md-raised success" aria-label="add_tag" ng-click="$ctrl.runAction('tag')" ng-disabled="true">
        ADD TAG
      </md-button>
      <md-button class="md-raised warn" aria-label="delete" ng-click="$ctrl.runAction('del')">
        DELETE
      </md-button>
      <md-button ng-if="isFolderTrash" class="md-raised primary" aria-label="restore" ng-click="$ctrl.runAction('restore')">
        RESTORE
      </md-button>
    </div>
  </div>

</section>