<div ng-controller="Complaints.ActionsController">
    <div class="col-xs-4">
        <div class="checkbox">
            <label>
                <input type="checkbox" ng-model="restricted" ng-click="onClickRestrict($event)" permission="restrictComplaint"
                        permission-object-type="COMPLAINT" permission-properties="objectInfo" permission-action="disabled">
                <span translate>complaints.comp.actions.restrict</span>
            </label>
        </div>
    </div>

    <div class="pull-right">
        <div class="btn-group">
            <a class="btn btn-sm btn-default" ui-sref="frevvo.new-complaint()" ng-show="isFrevvoFormType">
                <i class="fa fa-edit"></i>
                <span translate>complaints.comp.actions.new.button</span>
            </a>
            <a class="btn btn-sm btn-default" ng-click="newComplaint()" ng-show="isAngularFormType">
                <i class="fa fa-edit"></i>
                <span translate>complaints.comp.actions.new.button</span>
            </a>
            <a class="btn btn-sm btn-default" ng-click="closeComplaint(closeParams)" ng-show="showCreateAndClose && isAngularFormType">
                <i class="fa fa-times"></i>
                <span translate>complaints.comp.actions.close.button</span>
            </a>
            <a class="btn btn-sm btn-default" ui-sref="frevvo.close-complaint(closeParams)"
                    ng-show="showCreateAndClose && isFrevvoFormType">
                <i class="fa fa-times"></i>
                <span translate>complaints.comp.actions.close.button</span>
            </a>
            <button class="btn btn-sm btn-default" ng-click="onClickChildOutcome(outcome.name)"
                    ng-repeat="outcome in availableChildOutcomes" ng-show="showBtnChildOutcomes">
                {{outcome.description}}
            </button>
            <button class="btn btn-sm btn-default" ng-show="showBtnUnsubscribe" ng-click="unsubscribe(objectInfo)">
                <i class="fa fa-bullhorn"></i>
                <span translate>complaints.comp.actions.unsubscribe.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-show="showBtnSubscribe" ng-click="subscribe(objectInfo)">
                <i class="fa fa-bullhorn"></i>
                <span translate>complaints.comp.actions.subscribe.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-if="assignee.length == 0 && currentUserProfile.groups.indexOf(owningGroup) > -1"
                    ng-click="claim(objectInfo)">
                <i class="fa fa-edit"></i>
                <span translate>complaints.comp.actions.claim.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-if="assignee.length > 0 && currentUserProfile.userId == assignee"
                    ng-click="unclaim(objectInfo)">
                <i class="fa fa-edit"></i>
                <span translate>complaints.comp.actions.unclaim.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-click="refresh()">
                <i class="fa fa-refresh"></i>
            </button>
            <button class="btn btn-sm btn-default" ng-click="sendEmail()">
                <i class="fa fa-envelope"></i>
                <span translate>complaints.comp.actions.sendEmail.button</span>
            </button>
        </div>
    </div>
</div>
