<button
	class="add-comment-btn js-add-comment-btn d-block"
	ng-hide="cc.config.showFullInput"
	ng-click="cc.showFullInput()">

	<span lmsg="common.cla_comments.placeholder">[Type your message…]</span>
</button>

<div class="new-comment" ng-if="cc.config.showFullInput">
    <div class="new-comment">
		<img name="user_image" ng-src="{{ cc.config.user_photo_url }}" width="46" class="profile-img">
		<comment-edit id="new_comment_{{ cc.uniqueId }}" class="new-comment-edit" name="comment_textnew" comment="cc.new_comment"></comment-edit>
    </div>

    <div>
		<ng-include src="'/intranet/comments/html/ui/controls.html'"></ng-include>
	</div>

    <div class="row mb-2">
        <div class="col-5">
			<ng-include src="'/intranet/comments/html/ui/control-buttons.html'"></ng-include>
		</div>

        <div class="col-12 col-sm-7 mt-1 mt-sm-0 text-right">
			<div class="btn-group w-100">
				<select id="threadSelect"
						class="btn btn-secondary w-100"
						ng-init="cc.discussions.length === 1 ? cc.selectedThreadId = cc.discussions[0].id : ''"
						ng-model="cc.selectedThreadId"
						ng-options="discuss.id as discuss.title for discuss in cc.discussions">

					<option ng-if="cc.discussions.length > 1" value="" lmsg="comments.component.select_topic">[Select a topic]</option>
				</select>

                <button type="submit" class="btn btn-secondary js-btn-cancel" ng-click="cc.hideFullInput()" rel="tooltip" title="${common:cancel.body}" aria-label="${common:cancel.body}">
					<ion-icon name="close-circle-outline"></ion-icon>
                </button>

				<button type="submit" class="btn btn-primary" ng-click="cc.new( $event )" rel="tooltip" lmsg="title:common.post" ng-disabled="!cc.can_save || !cc.selectedThreadId || cc.discussions.length === 0">
					<ion-icon name="paper-plane-outline"></ion-icon>
                </button>
            </div>
        </div>
    </div>
</div>
