<template name="privateGroupsFlex">
	<header class="primary-background-color">
		<div>
			<h4>{{_ "Private_Groups"}}</h4>
		</div>
	</header>
	<div class="content primary-background-color">
		<div class="wrapper">
			<h4>{{_ "Create_new"}}</h4>
			<div class="input-line">
				<label class="color-tertiary-font-color" for="pvt-group-name">{{_ "Name"}}</label>
				<input type="text" id="pvt-group-name" class="required" dir="auto" placeholder="{{_ 'Enter_name_here'}}">
			</div>
			<div class="input-line">
				<label class="color-tertiary-font-color" for="channel-ro">{{_ "Read_only_group"}}</label>
				<input type="checkbox" id="channel-ro">
			</div>
			<div class="input-line">
				<label class="color-tertiary-font-color" for="pvt-group-members">{{_ "Select_users" }}</label>
				{{> inputAutocomplete settings=autocompleteSettings id="pvt-group-members" class="search" placeholder=(_ "Search_by_username") autocomplete="off"}}
				<ul class="selected-users">
					{{#each selectedUsers}}
						<li class="background-transparent-darker">{{.}} <i class="icon-cancel remove-room-member"></i></li>
					{{/each}}
				</ul>
			</div>
			{{#if error.fields}}
				<div class="input-error error-color">
					<strong>{{_ "Oops!"}}</strong>
					{{#each error.fields}}
						<p>{{_ "The_field_is_required" .}}</p>
					{{/each}}
				</div>
			{{/if}}
			{{#if error.invalid}}
				<div class="input-error error-color">
					<strong>{{_ "Oops!"}}</strong>
					{{{_ "Invalid_room_name" groupName}}}
				</div>
			{{/if}}
			{{#if error.duplicate}}
				<div class="input-error error-color">
					<strong>{{_ "Oops!"}}</strong>
					{{{_ "Duplicate_private_group_name" groupName}}}
				</div>
			{{/if}}
			{{#if error.archivedduplicate}}
				<div class="input-error error-color">
					<strong>{{_ "Oops!"}}</strong>
					{{{_ "Duplicate_archived_private_group_name" groupName}}}
				</div>
			{{/if}}
			<div class="input-submit">
				<button class="button primary save-pvt-group">{{_ "Create" }}</button>
				<button class="button cancel-pvt-group">{{_ "Cancel" }}</button>
			</div>
		</div>
	</div>
</template>
