<div ng-controller="Cases.InfoController">
    <div class="clearfix">
        <div class="row">
            <div class="col-xs-6">
                <h4>
                    <a href="#" editable-text="objectInfo.title" onaftersave="saveCase()" permission="editCase"
                            permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable" e-required>
                        {{objectInfo.title || 'common.value.unknown' | translate}}
                    </a>
                    <a ng-href="#" editable-select="objectInfo.status" onaftersave="saveCase()" permission="editCaseStatus"
                            permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable"
                            e-ng-options="c.key as (c.value | translate) for c in caseStatuses">
                        ({{ (objectInfo.status | translateData: 'core.lookups.changeCase.statuses' : lang) || ('common.value.unknown' |
                        translate) }})
                    </a>
                </h4>
            </div>
            <div class="col-xs-6  text-right">
                <h4>{{objectInfo.caseNumber}}</h4>
                <small ng-if="hasSuggestedCases" style="margin-right: 3%">
                    <i class="fa fa-lightbulb-o" aria-hidden="true" style="color:#e6b800"/>
                    <a href="javascript:;" ng-click="suggestedCases()">
                        {{'cases.comp.suggestedCases.title' | translate}} ({{numberOfSuggestedCases}})
                    </a>
                </small>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold">
                    <a href="#" editable-select="objectInfo.caseType" onaftersave="saveCase()" permission="editCase"
                            permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable"
                            e-ng-options="c.key as (c.value | translate) for c in caseTypes">
                        {{ (objectInfo.caseType | translateData: 'core.lookups.categories' : lang) || ('common.value.unknown' | translate)
                        }}</a>
                </div>
                <small class="text-muted"><span translate>cases.comp.info.type.label</span></small>
            </div>
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold">{{objectInfo.created | date: ('common.defaultDateTimeUIFormat' | translate)}}</div>
                <small class="text-muted"><span translate>cases.comp.info.created.label</span></small>
            </div>
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold">
                    <a href="#" editable-select="objectInfo.priority" onaftersave="saveCase()" permission="editCase"
                            permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable"
                            e-ng-options="p.key as (p.key | translateData: 'core.lookups.priorities' : lang) for p in priorities">
                        {{ (objectInfo.priority | translateData: 'core.lookups.priorities' : lang) || ('common.value.unknown' | translate)
                        }}</a>
                </div>
                <small class="text-muted"><span translate>cases.comp.info.priority.label</span></small>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold">
                    <a href="javascript:;" class="editable-click no-outline" ng-click="userOrGroupSearch()"
                            permission="editCaseOwningGroup" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                            permission-action="disable">
                        <user-full-name userId="assignee" fallback="{{'cases.comp.approvalRouting.assigne.none' | translate}}" />
                    </a>
                </div>
                <small class="text-muted"><span translate>cases.comp.info.assignee.label</span></small>
            </div>
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold">
                    <a href="javascript:;" class="editable-click no-outline" ng-click="userOrGroupSearch()"
                            permission="editCaseOwningGroup" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                            permission-action="disable">
                        {{owningGroup || 'common.value.unknown' | translate}}</a>
                </div>
                <small class="text-muted"><span translate>cases.comp.info.owningGroup.label</span></small>
            </div>
            <div class="col-xs-12 col-md-4">
                <div class="h4 font-bold popup-move-on-left">
                    <a href="javascript:;"
                       ng-click="registerWatcher()"
                       moment-picker="dueDate.dueDateInfoUIPicker"
                       ng-model="dueDate.dueDateInfo"
                       format="MM/DD/YYYY h:mmA"
                       min-date="minDate"
                       start-view="month"
                       auto-close="true"
                       is-open="dueDate.isOpen"
                       permission="editCase" permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable">
                        {{ (dateInfo.dueDate | date: ('common.defaultDateTimeUIFormat' | translate)) || ('common.value.unknown' | translate) }}
                    </a>
                </div>
                <small class="text-muted"><span translate>cases.comp.info.dueDate.label</span></small>
            </div>
        </div>
    </div>
</div>
