<div ng-controller="Cases.ActionsController">
    <div class="col-xs-4">
        <div class="checkbox">
            <label>
                <input type="checkbox" ng-model="restricted" ng-click="onClickRestrict($event)" permission="restrictCase"
                        permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disabled">
                <span translate>cases.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-case()" ng-show="isFrevvoFormType">
                <i class="fa fa-edit"></i>
                <span translate>cases.comp.actions.new.button</span>
            </a>
            <a class="btn btn-sm btn-default" ng-click="newCaseFile()" ng-show="isAngularFormType">
                <i class="fa fa-edit"></i>
                <span translate>cases.comp.actions.new.button</span>
            </a>
            <a class="btn btn-sm btn-default" ng-click="changeCaseStatus(changeCaseStatusParams)"
                    ng-show="isAngularFormType && showChangeCaseStatus">
                <i class="fa fa-edit"></i>
                <span translate>cases.comp.actions.status.button</span>
            </a>
            <a class="btn btn-sm btn-default" ui-sref="frevvo.change-case-status(changeCaseStatusParams)" ng-show="isFrevvoFormType">
                <i class="fa fa-edit"></i>
                <span translate>cases.comp.actions.status.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>cases.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>cases.comp.actions.subscribe.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-click="merge(objectInfo)">
                <i ng-class="merging ? 'fa fa-circle-o-notch fa-spin' : 'fa fa-random'" />
                <span translate>cases.comp.actions.merge.button</span>
            </button>
            <button class="btn btn-sm btn-default" ng-click="split()">
                <i ng-class="splitting ? 'fa fa-circle-o-notch fa-spin' : 'fa fa-code-fork'" />
                <span translate>cases.comp.actions.split.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>cases.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>cases.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>cases.comp.actions.sendEmail.button</span>
            </button>
        </div>
    </div>
</div>