{{#if folders}}
	<div class="row">
		<div class="col">
			<div class="view-customize">
				<h1 class="admin-heading">{{folders.length}} shared {{label}}</h1>
			</div>
		</div>
	</div>
	<div class="view-customize">
		<div class="space-list">
			{{#each folders as |folder|}}
				<div class="space row">
					<div class="col-12 col-sm-8">
						{{#link-to 'folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
					</div>
					<div class="col-12 col-sm-4 text-right">
						<div id="space-delete-button-{{folder.id}}" class="button-icon-danger align-middle" data-toggle="tooltip" data-placement="top" title="Delete space" {{action "onShow" folder.id}}>
							<i class="material-icons" data-toggle="modal" data-target="#space-delete-modal" data-backdrop="static">delete</i>
						</div>
					</div>
				</div>
			{{/each}}
		</div>
	</div>

	<div id="space-delete-modal" class="modal" tabindex="-1" role="dialog">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">Space Deletion</div>
				<div class="modal-body">
					<form onsubmit={{action 'onDelete'}}>
						<p>Are you sure you want to delete this space and all documents?</p>
						<div class="form-group">
							<label for="delete-space-name">Please type space name to confirm</label>
							{{input type='text' id="delete-space-name" class="form-control mousetrap" placeholder="Space name" value=deleteSpace.name}}
							<small class="form-text text-muted">This will delete all documents and templates within this space!</small>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
					<button type="button" class="btn btn-danger" onclick={{action 'onDelete'}}>Delete</button>
				</div>
			</div>
		</div>
	</div>
{{else}}
	<p>There are no spaces to maintain</p>
{{/if}}
