import{a as Se}from"./chunk-FFR3SHS6.js";import{a as he}from"./chunk-G7OJYPNY.js";import{a as ge}from"./chunk-D4RZOGGF.js";import{a as ve,b as Pe,c as Ie}from"./chunk-UZB7YFT6.js";import{a as Te}from"./chunk-KCLQIV7M.js";import{b as ke,c as _e,d as we}from"./chunk-YOJ4KGSB.js";import"./chunk-CO3X7TQN.js";import{a as ye}from"./chunk-VSFNMVXJ.js";import"./chunk-WQ6DP4JQ.js";import{Db as ue,Eb as be,j as g,o as re}from"./chunk-YSQLW2JA.js";import{Dd as fe,Gb as B,Hb as me,aa as le,ba as ce,ee as xe,fa as pe,pa as z}from"./chunk-NVJ2ZZFT.js";import{Aa as l,B as H,Ba as b,De as N,Ge as M,He as R,Mc as ee,Nc as te,Ng as se,Q as W,Qf as y,Rd as A,S,Sd as ie,Se as ne,Tb as X,Te as f,Ue as oe,Wb as C,Yg as h,_a as K,ab as d,af as ae,bb as m,bh as de,cd as O,dc as J,dd as p,eh as D,gb as Q,ha as u,hc as V,l as G,ma as $,mg as x,u as q,xa as E,xc as Z,ya as c}from"./chunk-SKPDQO4E.js";var Ee=`<div class="h-100">
    <side-navigation *ngIf="visibleComponent">
        <ng-template side-navigation-nav>
            <armon-pacs-filter-select [title]="'PACS.PPERMISSION_TYPE_ACTIVE'" [options]="activeFilterOptions"
                (filterChanged)="activeFilterChanged($event)"></armon-pacs-filter-select>
            <armon-pacs-filter-text class="mt-3" [title]="'COMMON.SEARCH_HEADER'"
                (filterChanged)="nameFilterChanged($event)"></armon-pacs-filter-text>
        </ng-template>
        <ng-template side-navigation-content>
            <div class="row my-3">
                <div class="col-12">
                    <button class="btn btn-sm btn-primary" (click)="addPPermissionType($event)"
                        [disabled]="editMode">{{'PACS.ADD_PPERMISSION_TYPE'|translate}}</button>
                </div>
            </div>
            <div class="row" [@listAnimation]="types.length">
                <armon-pacs-ppermission-type-list-item class="col-12 col-lg-6" *ngFor="let type of types"
                    [ppermissionType]="type" (typeDeleted)="onTypeDeleted($event)">
                </armon-pacs-ppermission-type-list-item>
            </div>
            <div class="row my-2">
                <div class="col-12">
                    <armon-pagination [paginationResponse]="paginationResponse" (pageChanged)="pageChanged($event)">
                    </armon-pagination>
                </div>
            </div>
        </ng-template>
    </side-navigation>
</div>`;var Ce="";var Oe=`<ng-container *ngIf="visibleComponent">
  <div class="modal-header">
    <span class="text-lg">{{(editMode ? 'PACS.EDIT_PPERMISSION_TYPE' : 'PACS.ADD_PPERMISSION_TYPE' ) |
      translate}}</span>
  </div>
  <div class="modal-body" style="min-height: 50vh;">
    <form #form="ngForm" novalidate>
      <nz-tabset [nzAnimated]="false">
        <nz-tab nzTitle="{{'PACS.PPERMISSION_TYPE_BASIC_TITLE'|translate}}">
          <div class="row">
            <div class="col-12 px-3">
              <div class="form-group">
                <label for="nameInput" class="required">{{'PACS.PPERMISSION_TYPE_NAME' | translate}}</label>
                <input type="text" id="nameInput" maxlength="255" name="name" [(ngModel)]="ppermissionType.name"
                  class="form-control form-control-sm" required>
              </div>
            </div>
            <div class="col-12 px-3">
              <div class="form-group">
                <label>{{'PACS.PPERMISSION_TYPE_DESC' | translate}}</label>
                <textarea name="description" [(ngModel)]='ppermissionType.description'
                  class="form-control form-control-sm"
                  placeholder="{{'PACS.PPERMISSION_TYPE_DESC_PLACEHOLDER' | translate}}" rows="3" cols="20"
                  maxlength="512">
            </textarea>
              </div>
            </div>
            <div class="col-12 px-3">
              <div class="form-group">
                <label for="isPassiveInput">{{'PACS.PPERMISSION_TYPE_ACTIVE' | translate}}</label>
                <div class="form-check">
                  <input id="isPassiveInput" customValue type="checkbox" class="form-check-input" [trueValue]="false"
                    [falseValue]="true" [(ngModel)]="ppermissionType.isPassive" name="isPassive">
                  <label for="isPassiveInput" class="form-check-label">{{'PACS.PPERMISSION_TYPE_ACTIVE_STATE' |
                    translate}}</label>
                </div>
              </div>
            </div>
          </div>
        </nz-tab>
        <nz-tab nzTitle="{{'PACS.PPERMISSION_TYPE_WORKPLAN_TITLE'|translate}}">
          <div class="row mhs-20">
            <div class="col-12 px-3 mb-3">
              <div class="form-group">
                <label>{{'PACS.PPERMISSION_TYPE_WORKPLAN_TYPE' | translate}}</label>
                <armon-work-duration-type-input [(ngModel)]="ppermissionType.method"
                  [ngModelOptions]="{standalone: true}"></armon-work-duration-type-input>
              </div>
              <div class="form-group" *ngIf="ppermissionType.method == pacsPPermissionWorkDurationType.OffTime">
                <label>{{'PACS.PPERMISSION_TYPE_APPLY' | translate}}</label>
                <div class="form-check">
                  <input id="applyOnHolidaysInput" type="checkbox" class="form-check-input"
                    [(ngModel)]="ppermissionType.applyOnHolidays" name="applyOnHolidays">
                  <label for="applyOnHolidaysInput" class="form-check-label">{{'PACS.PPERMISSION_TYPE_APPLY_VACATIONS' |
                    translate}}</label>
                </div>
              </div>
              <div class="form-group" *ngIf="ppermissionType.method == pacsPPermissionWorkDurationType.DeclaredWork">
                <label>{{'PACS.PPERMISSION_TYPE_APPLY' | translate}}</label>
                <div class="form-check">
                  <input id="applyOnlyOnWorkingHoursInput" type="checkbox" class="form-check-input"
                    [(ngModel)]="ppermissionType.applyOnlyOnWorkingHours" name="applyOnlyOnWorkingHours">
                  <label for="applyOnlyOnWorkingHoursInput"
                    class="form-check-label">{{'PACS.PPERMISSION_TYPE_APPLY_ONLY_WORKINGHOURS' | translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label>{{'PACS.PPERMISSION_TYPE_UNIT' | translate}}</label>
                <div>
                  <div class="form-check custom-control-inline" [ngClass]="{'disabled': ppermissionType.preDefined}">
                    <input id="isDailyScheduledFalse" name="isDailyScheduledFalse" type="radio" class="form-check-input"
                      [(ngModel)]="ppermissionType.isDailyScheduled" [value]="false"
                      [disabled]="ppermissionType.preDefined" (ngModelChange)="isDailyScheduledChanged($event)">
                    <label class="form-check-label"
                      for="isDailyScheduledFalse">{{'PACS.PPERMISSION_TYPE_UNIT_HOUR'|translate}}</label>
                  </div>
                  <div class="form-check custom-control-inline" [ngClass]="{'disabled': ppermissionType.preDefined}">
                    <input id="isDailyScheduledTrue" name="isDailyScheduledTrue" type="radio" class="form-check-input"
                      [(ngModel)]="ppermissionType.isDailyScheduled" [value]="true"
                      [disabled]="ppermissionType.preDefined" (ngModelChange)="isDailyScheduledChanged($event)">
                    <label class="form-check-label"
                      for="isDailyScheduledTrue">{{'PACS.PPERMISSION_TYPE_UNIT_DAY'|translate}}</label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <label for="minValueInput" class="required">{{'PACS.PPERMISSION_TYPE_UNIT_MIN' | translate}}</label>
                <div class="input-group input-group-sm w-50">
                  <input type="number" min="1" max="90" customMin="1" customMax="90" onlyNumber="true" required
                    [disabled]="ppermissionType.lessThanOneUnitEnabled"
                    onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="minValueInput"
                    class="form-control" [(ngModel)]="ppermissionType.minValue" name="minValue">
                  <span class="input-group-text"
                    *ngIf="!ppermissionType.isDailyScheduled">{{'PACS.WORKPLAN_PERIOD_UNIT_HOUR'|translate}}</span>
                  <span class="input-group-text"
                    *ngIf="ppermissionType.isDailyScheduled">{{'PACS.WORKPLAN_PERIOD_UNIT_DAY'|translate}}</span>
                </div>
              </div>
              <div class="form-group mb-4">
                <div class="form-check">
                  <input id="lessThanOneUnitEnabledInput" type="checkbox"
                    [(ngModel)]="ppermissionType.lessThanOneUnitEnabled"
                    (ngModelChange)="onLessThanOneUnitEnabled($event)" class="form-check-input"
                    name="lessThanOneUnitEnabled">
                  <label class="form-check-label" for="lessThanOneUnitEnabledInput">{{(ppermissionType.isDailyScheduled
                    ?
                    'PACS.WORKPLAN_PERIOD_UNIT_HALF_DAY_INFO' : 'PACS.WORKPLAN_PERIOD_UNIT_LESS_HOUR_INFO' ) |
                    translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label>{{'PACS.PPERMISSION_TYPE_UNIT_PERIOD' | translate}}</label>
                <select [(ngModel)]="ppermissionType.maxValueBoundaryInterval" name="maxValueBoundaryInterval"
                  class="form-select form-select-sm w-50">
                  <option *ngFor="let unitPeriod of unitPeriods" [ngValue]="unitPeriod.value">
                    {{unitPeriod.i18nName | translate}}</option>
                </select>
              </div>
              <div class="form-group">
                <label for="maxValueInput" class="required">{{'PACS.PPERMISSION_TYPE_UNIT_MAX' | translate}}</label>
                <div class="input-group input-group-sm w-50">
                  <input type="number" min="1" max="365" customMin="1" customMax="365"
                    onkeypress="return event.charCode >= 48 && event.charCode <= 57" required id="maxValueInput"
                    class="form-control" [(ngModel)]="ppermissionType.maxValue" name="maxValue">
                  <span class="input-group-text">{{(ppermissionType.isDailyScheduled ? 'PACS.WORKPLAN_PERIOD_UNIT_DAY'
                    : 'PACS.WORKPLAN_PERIOD_UNIT_HOUR' ) | translate}}</span>
                </div>
              </div>
              <div class="form-group">
                <label for="showRemainingCountInput">{{'PACS.PPERMISSION_TYPE_LIST_REMAINING' | translate}}</label>
                <div class="form-check">
                  <input id="showRemainingCountInput" type="checkbox" [(ngModel)]="ppermissionType.showRemainingCount"
                    class="form-check-input" name="showRemainingCount">
                  <label class="form-check-label"
                    for="showRemainingCountInput">{{'PACS.PPERMISSION_TYPE_LIST_REMAINING_LABEL' | translate}}</label>
                </div>
                <div class="form-check">
                  <input id="isNegativeBalanceAllowedInput" type="checkbox"
                    [(ngModel)]="ppermissionType.isNegativeBalanceAllowed" class="form-check-input"
                    name="isNegativeBalanceAllowed">
                  <label class="form-check-label"
                    for="isNegativeBalanceAllowedInput">{{'PACS.PPERMISSION_TYPE_LIST_ALLOW_NEGATIVE_REMAINING_LABEL' |
                    translate}}</label>
                </div>
              </div>
            </div>
          </div>
        </nz-tab>
        <nz-tab nzTitle="{{'PACS.PPERMISSION_TYPE_PROCESS_TITLE'|translate}}">
          <div class="row">
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label for="hrCanInitInput">{{'PACS.PPERMISSION_TYPE_INIT' | translate}}</label>
                <div class="form-check"
                  [ngClass]="{'disabled': (!ppermissionType.personnelCanInit && !ppermissionType.unitManagerCanInit)}">
                  <input id="hrCanInitInput" type="checkbox" [(ngModel)]="ppermissionType.hrCanInit" name="hrCanInit"
                    class="form-check-input"
                    [disabled]="(!ppermissionType.personnelCanInit && !ppermissionType.unitManagerCanInit)">
                  <label class="form-check-label" for="hrCanInitInput">{{'PACS.PPERMISSION_TYPE_HR_CAN_INIT' |
                    translate}}</label>
                </div>
                <div class="form-check"
                  [ngClass]="{'disabled': (!ppermissionType.personnelCanInit && !ppermissionType.hrCanInit)}">
                  <input id="unitManagerCanInit" type="checkbox" [(ngModel)]="ppermissionType.unitManagerCanInit"
                    name="unitManagerCanInit" class="form-check-input"
                    [disabled]="(!ppermissionType.personnelCanInit && !ppermissionType.hrCanInit)">
                  <label class="form-check-label" for="unitManagerCanInit">{{'PACS.PPERMISSION_TYPE_MANAGER_CAN_INIT' |
                    translate}}</label>
                </div>
                <div class="form-check"
                  [ngClass]="{'disabled': (!ppermissionType.unitManagerCanInit && !ppermissionType.hrCanInit)}">
                  <input id="personnelCanInitInput" type="checkbox" [(ngModel)]="ppermissionType.personnelCanInit"
                    class="form-check-input" name="personnelCanInit"
                    [disabled]="(!ppermissionType.unitManagerCanInit && !ppermissionType.hrCanInit)">
                  <label class="form-check-label" for="personnelCanInitInput">{{'PACS.PPERMISSION_TYPE_USER_CAN_INIT' |
                    translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label for="needsManagerDeputyInput">{{'PACS.USER_PPERMISSION_DEPUTY' | translate}}</label>
                <div class="form-check">
                  <input id="needsManagerDeputyInput" type="checkbox" [(ngModel)]="ppermissionType.needsManagerDeputy"
                    class="form-check-input" name="needsManagerDeputy">
                  <label class="form-check-label"
                    for="needsManagerDeputyInput">{{'PACS.PPERMISSION_TYPE_MANAGER_DEPUTY_SEL' | translate}}</label>
                </div>
                <div class="form-check">
                  <input id="needsUserDeputyInput" type="checkbox" [(ngModel)]="ppermissionType.needsUserDeputy"
                    class="form-check-input" name="needsUserDeputy">
                  <label class="form-check-label" for="needsUserDeputyInput">{{'PACS.PPERMISSION_TYPE_USER_DEPUTY_SEL' |
                    translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label for="userMustSignInput">{{'PACS.PPERMISSION_TYPE_USER_DOCUMENT' | translate}}</label>
                <div class="form-check">
                  <input id="noteIsMandatoryInput" type="checkbox" [(ngModel)]="ppermissionType.noteIsMandatory"
                    class="form-check-input" name="noteIsMandatory">
                  <label class="form-check-label" for="noteIsMandatoryInput">{{'PACS.PPERMISSION_TYPE_USER_NOTE_LABEL' |
                    translate}}</label>
                </div>
                <div class="form-check">
                  <input id="userMustSignInput" type="checkbox" [(ngModel)]="ppermissionType.userMustSign"
                    class="form-check-input" name="userMustSign">
                  <label class="form-check-label" for="userMustSignInput">{{'PACS.PPERMISSION_TYPE_USER_SIGN_LABEL'
                    | translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label for="isUnpaidLeaveInput">{{'PACS.PPERMISSION_TYPE_USER_UNPAID' | translate}}</label>
                <div class="form-check">
                  <input id="isUnpaidLeaveInput" type="checkbox" [(ngModel)]="ppermissionType.isUnpaidLeave"
                    class="form-check-input" name="isUnpaidLeave">
                  <label class="form-check-label" for="isUnpaidLeaveInput">{{'PACS.PPERMISSION_TYPE_USER_UNPAID_LABEL' |
                    translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-xl-6 col-sm-12 px-3">
              <div class="form-group">
                <label for="sendNotificationHrInput">{{'PACS.PERMISSION_TYPE_NOTIFY'|translate}}</label>
                <div class="form-check">
                  <input id="sendNotificationHrInput" type="checkbox" [(ngModel)]="ppermissionType.notifyHR"
                    class="form-check-input" name="sendNotificationHrInput" name="notifyHR">
                  <label class="form-check-label" for="sendNotificationHrInput">{{'PACS.PERMISSION_TYPE_NOTIFY_HR' |
                    translate}}</label>
                </div>
                <div class="form-check">
                  <input id="sendNotificationManagersInput" type="checkbox" [(ngModel)]="ppermissionType.notifyManagers"
                    class="form-check-input" name="sendNotificationManagersInput" name="notifyManagers">
                  <label class="form-check-label"
                    for="sendNotificationManagersInput">{{'PACS.PERMISSION_TYPE_NOTIFY_MANAGERS'
                    |
                    translate}}</label>
                </div>
              </div>
            </div>
          </div>
        </nz-tab>
        <nz-tab nzTitle="{{'PACS.PPERMISSION_TYPE_APPROVEMENT'|translate}}">
          <div class="row">
            <div class="col-12 px-3">
              <div class="form-group">
                <div class="form-check custom-control-inline">
                  <input id="requireApprovementTrue" name="requireApprovement" type="radio" class="form-check-input"
                    [(ngModel)]="ppermissionType.requireApprovement" [value]="true">
                  <label class="form-check-label"
                    for="requireApprovementTrue">{{'PACS.PPERMISSION_TYPE_APPROVEMENT_REQ'|translate}}</label>
                </div>
                <div class="form-check custom-control-inline">
                  <input id="requireApprovementFalse" name="requireApprovement" type="radio" class="form-check-input"
                    [(ngModel)]="ppermissionType.requireApprovement" [value]="false">
                  <label class="form-check-label"
                    for="requireApprovementFalse">{{'PACS.PPERMISSION_TYPE_APPROVEMENT_NOT_REQ'|translate}}</label>
                </div>
              </div>
            </div>
            <div class="col-12 px-3">
              <armon-pacs-ordered-list [disabled]="!ppermissionType.requireApprovement"
                [title]="'PACS.PPERMISSION_TYPE_APPROVEMENT_PROCESS'" [listItems]="approveListItems"
                [(orderedList)]="ppermissionType.approvementList"></armon-pacs-ordered-list>
            </div>
            <div class="col-12 px-3">
              <div class="form-group">
                <label for="sendNotificationInput"></label>
                <div class="form-check" [ngClass]="{'disabled': !ppermissionType.requireApprovement}">
                  <input id="sendNotificationInput" type="checkbox" [(ngModel)]="ppermissionType.sendNotification"
                    class="form-check-input" name="sendNotification" [disabled]="!ppermissionType.requireApprovement">
                  <label class="form-check-label"
                    for="sendNotificationInput">{{'PACS.PPERMISSION_TYPE_APPROVEMENT_NOTIFIY' | translate}}</label>
                </div>
              </div>
            </div>
          </div>
        </nz-tab>
        <nz-tab [nzTitle]="titleApplicableDays">
          <ng-template #titleApplicableDays>
            <span [ngClass]="{'text-danger': !applicableDays.valid}">
              <cds-icon *ngIf="!applicableDays.valid" shape="warning-standard" class="me-1 cds-icon-16"></cds-icon>
              <span>{{'PACS.PPERMISSION_TYPE_APPLICABLE_DAYS' |
                translate}}</span>
            </span>
          </ng-template>
          <div class="row">
            <div class="col-12">
              <armon-pacs-ppermission-applicable-days #applicableDays
                [(applicableDays)]="ppermissionType.applicableDays"></armon-pacs-ppermission-applicable-days>
            </div>
          </div>
        </nz-tab>
      </nz-tabset>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-outline-primary me-2" (click)="onCancelClicked($event)">
      {{'BUTTON.CANCEL' | translate}}
    </button>
    <button class="btn btn-primary" (click)="onSaveClicked($event)" [disabled]="!form.valid || !applicableDays.valid">
      {{'BUTTON.SAVE' | translate}}
    </button>
  </div>
</ng-container>

<!-- <span>FORM</span>
    <pre>{{form.valid}}</pre>
    <pre>{{form.value | json}}</pre> -->
<!-- <span>DATA</span>
    <pre>{{ppermissionType | json}}</pre> -->`;var Ae="";var Ne=`<div class="ordered-list-container">
    <div class="row">
        <div class="col-12 my-3" *ngIf="title && title.length>0">
            {{title|translate}}
        </div>
        <div class="col-12 mb-3">
            <button class="btn btn-sm btn-outline-primary me-2 mb-1" *ngFor="let listItem of listItems"
                (click)="addButtonClicked(listItem)">
                <cds-icon shape="plus-circle" solid class="cds-icon-18 me-2"></cds-icon>{{listItem.label|translate}}
            </button>
        </div>
        <div class="col-12 pt-2">
            <div class="listed-container d-flex flex-column">
                <span class="text-md"
                    *ngIf="items && items.length==0">{{'PACS.PPERMISSION_TYPE_APPROVEMENT_INFO'|translate}}</span>
                <div class="listed-container-item d-flex"
                    *ngFor="let item of items; let itemIndex = index; let itemFirst = first; let itemLast = last;">
                    <div class="itemOrder d-flex align-items-center justify-content-center">
                        <span class="fw-medium">{{itemIndex+1}}</span>
                    </div>
                    <!-- PREV BUTTON -->
                    <div class="buttonOrder" [attr.disabled]="itemFirst"
                        (click)="!itemFirst && movePrevItemClicked(item)">
                        <cds-icon [attr.shape]="item.couldBeIntermediate?'angle':'angle-double'" direction="up"
                            class="cds-icon-16"></cds-icon>
                    </div>
                    <!-- NEXT BUTTON -->
                    <div class="buttonOrder" last [attr.disabled]="itemLast"
                        (click)="!itemLast && moveNextItemClicked(item)">
                        <cds-icon [attr.shape]="item.couldBeIntermediate?'angle':'angle-double'" direction="down"
                            class="cds-icon-16"></cds-icon>
                    </div>
                    <div class="itemLabel flex-grow-1 d-flex align-items-center">
                        <span>
                            {{item.label|translate}}
                            <cds-icon *ngIf="item.couldBeIntermediate==false" shape="help" class="cds-icon-16 ms-1"
                                nz-tooltip
                                nzTooltipTitle="{{'PACS.DIALOG_APPROVEMENT_NOT_INTERMEDIATE' | translate}}"></cds-icon>
                        </span>
                    </div>
                    <!-- DELETE BUTTON -->
                    <span class="buttonDelete" (click)="removeItemClicked(item)">
                        <cds-icon shape="times" class="cds-icon-16"></cds-icon>
                    </span>
                </div>
            </div>
        </div>
    </div>
    <div class="disabled-overlay" *ngIf="disabled"></div>
</div>`;var Me=`.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}:host .ordered-list-container{padding:6px 12px 12px;border:1px solid rgba(10,42,90,.3);-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;position:relative}:host .ordered-list-container .disabled-overlay{position:absolute;margin:auto;inset:0;cursor:default;background-color:#ffffff80;z-index:1}:host .ordered-list-container .listed-container{padding:6px;background-color:#9993;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}:host .ordered-list-container .listed-container .listed-container-item{padding:6px}:host .ordered-list-container .listed-container .listed-container-item .baseItem,:host .ordered-list-container .listed-container .listed-container-item .itemLabel,:host .ordered-list-container .listed-container .listed-container-item .itemOrder,:host .ordered-list-container .listed-container .listed-container-item .baseActiveItem,:host .ordered-list-container .listed-container .listed-container-item .buttonDelete,:host .ordered-list-container .listed-container .listed-container-item .buttonOrder{padding:3px 6px}:host .ordered-list-container .listed-container .listed-container-item .baseActiveItem,:host .ordered-list-container .listed-container .listed-container-item .buttonDelete,:host .ordered-list-container .listed-container .listed-container-item .buttonOrder{cursor:pointer;padding:3px}:host .ordered-list-container .listed-container .listed-container-item .itemOrder{-webkit-border-top-left-radius:.375rem;-moz-border-radius-topleft:.375rem;border-top-left-radius:.375rem;-webkit-border-v-left-radius:.375rem;-moz-border-radius-bottomleft:.375rem;border-bottom-left-radius:.375rem;background-color:#0a2a5ab3;color:#fdfeff;min-width:24px}:host .ordered-list-container .listed-container .listed-container-item .itemLabel{background-color:#fdfeff;color:#0a2a5a}:host .ordered-list-container .listed-container .listed-container-item .buttonOrder{background-color:#62a325b3;color:#fff}:host .ordered-list-container .listed-container .listed-container-item .buttonOrder[last]{border-left:1px solid #62a325}:host .ordered-list-container .listed-container .listed-container-item .buttonOrder[disabled=true]{background-color:#99999980;color:#fff;cursor:default}:host .ordered-list-container .listed-container .listed-container-item .buttonDelete{background-color:#c82602b3;color:#fff;-webkit-border-top-right-radius:.375rem;-moz-border-radius-topv:.375rem;border-top-right-radius:.375rem;-webkit-border-v-right-radius:.375rem;-moz-border-radius-bottomright:.375rem;border-bottom-right-radius:.375rem}
`;function Ze(r){return r==null?[]:Array.isArray(r)?r:[r]}function Re(r=[],e,{isMutate:t=!1,isDuplicate:n=!1,isSwap:o=!0,fill:i}={}){let a=t?r:r.slice();return Ze(e).forEach(({from:P,to:F})=>{let He=a[F];a[F]=r[P],n?a[F]=r[P]:i?a[P]=i:o?a[P]=He:a[P]=null}),a}var et=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},L=class{interactionService;translateService;title="";disabled=!1;listItems=[];orderedList;items=[];constructor(e,t){this.interactionService=e,this.translateService=t}ngOnInit(){this.prepareItems()}ngOnDestroy(){}prepareItems(){this.orderedList.forEach((e,t)=>{this.addItemToList(this.listItems.find(n=>n.value===e),!1)})}updateOrderedList(){this.orderedList.length>0&&this.orderedList.splice(0,this.orderedList.length),this.items.forEach((e,t)=>{this.orderedList[t]=e.value})}addItemToList(e,t=!0){let n=e.id,o=J(e);o.id=V(),o.parentId=n;let i=this.items.length;i>1&&(i=Z(this.items,a=>a.couldBeIntermediate)+1),this.items.splice(i,0,o),t&&this.updateOrderedList()}removeItemFromList(e){let t=this.items.findIndex(n=>n.id===e.id);this.items.splice(t,1),this.updateOrderedList()}swapItems(e,t){let n,o;n=this.items.findIndex(a=>a.id===e.id),e.couldBeIntermediate?o=t?n-1:n+1:o=t?0:this.items.length-1;let i=this.items[o];if(!(n==0||n==this.items.length-1)&&i.couldBeIntermediate==!1&&(o==0||o==this.items.length-1)){this.translateService.get([i.label]).subscribe(a=>{this.interactionService.showDialog("PACS.PPERMISSION_TYPE_APPROVEMENT_PROCESS","PACS.DIALOG_APPROVEMENT_NOT_MOVE_INTERMEDIATE",null,{label:a[i.label]},!1,"BUTTON.OK","",!1,()=>{})});return}else this.items=Re(this.items,{from:n,to:o}),this.updateOrderedList()}addButtonClicked(e){e.isUnique?this.items.findIndex(t=>t.parentId===e.id)>=0?this.interactionService.showDialog("PACS.PPERMISSION_TYPE_APPROVEMENT_PROCESS","PACS.DIALOG_APPROVEMENT_DUPLICATE_ITEM",null,null,!1,"BUTTON.OK","",!1,()=>{}):this.addItemToList(e):this.addItemToList(e)}removeItemClicked(e){this.removeItemFromList(e)}movePrevItemClicked(e){this.swapItems(e,!0)}moveNextItemClicked(e){this.swapItems(e,!1)}static ctorParameters=()=>[{type:y},{type:O}];static propDecorators={title:[{type:l}],disabled:[{type:l}],listItems:[{type:l}],orderedList:[{type:l}]}};L=et([c({selector:"armon-pacs-ordered-list",template:Ne,standalone:!0,imports:[m,d,h,p],styles:[Me]})],L);var I=class{value;label;isUnique;couldBeIntermediate;id=V();parentId;constructor(e,t,n=!1,o=!0){this.value=e,this.label=t,this.isUnique=n,this.couldBeIntermediate=o}};var ze=`<div>\r
    <div class="row">\r
        <div class="col-12 mb-3">\r
            <div class="d-flex align-items-center">\r
                <div class="d-flex w-50">\r
                    <button class="btn btn-sm btn-primary" (click)="onAddApplicableDaysClicked($event)">\r
                        <cds-icon shape="plus-circle" solid\r
                            class="cds-icon-18 me-2"></cds-icon>{{'PACS.PPERMISSION_TYPE_APPLICABLE_DAYS_ADD'|translate}}\r
                    </button>\r
                </div>\r
                <div\r
                    class="d-flex w-50 align-items-center color-gray-darkest border border-1 border-dark-subtle rounded-1 px-2 py-1">\r
                    <cds-icon shape="info-standard" class="me-2 cds-icon-30"></cds-icon>\r
                    <span class="text-xs">{{'PACS.PPERMISSION_TYPE_APPLICABLE_DAYS_DIRECTION' |\r
                        translate :\r
                        languageService.userTranslate}}</span>\r
                </div>\r
            </div>\r
        </div>\r
        <div class="col-12 mxh-vh-50 overflow-y-scroll">\r
            <form [formGroup]="form">\r
                <ng-container *ngFor="let formApplicableDaysControl of formApplicableDays.controls; let index = index;">\r
                    <div class="w-100 bg-color-primary-tint p-3 mb-3 position-relative rounded-1 d-flex flex-column row-gap-2"\r
                        [formGroup]="formApplicableDaysControl">\r
                        <div>\r
                            <label class="report-checkbox-label" nz-checkbox\r
                                [formControl]="formApplicableDaysControl.get('selectedAll')">{{'COMMON.ALL_USERS' |\r
                                translate :\r
                                languageService.userTranslate}}</label>\r
                        </div>\r
                        <!-- *ngIf="formApplicableDaysControl.get('selectedAll').value == false" -->\r
                        <div>\r
                            <label class="report-form-label">{{'COMMON.USER_FILTER' | translate :\r
                                languageService.userTranslate}}</label>\r
                            <armon-user-filter-control [invalid]="formApplicableDaysControl.get('userFilter').invalid"\r
                                [formControl]="formApplicableDaysControl.get('userFilter')"></armon-user-filter-control>\r
                            <ng-template\r
                                *ngTemplateOutlet="controlValidationTemplate; context: {$implicit: formApplicableDaysControl, control:formApplicableDaysControl.get('userFilter')}">\r
                            </ng-template>\r
                        </div>\r
                        <div>\r
                            <label class="report-form-label">{{'PACS.WORKPLAN_PERIOD_DAYS_TTILE' | translate}}</label>\r
                            <armon-day-of-week-input [invalid]="formApplicableDaysControl.get('days').invalid"\r
                                [allowClear]="true" [formControl]="formApplicableDaysControl.get('days')"\r
                                [allowMulti]="true"></armon-day-of-week-input>\r
                            <ng-template\r
                                *ngTemplateOutlet="controlValidationTemplate; context: {$implicit: formApplicableDaysControl, control:formApplicableDaysControl.get('days')}">\r
                            </ng-template>\r
                        </div>\r
                        <!-- absolute position -->\r
                        <div class="position-absolute w-auto" style="top: 8px; right: 8px;">\r
                            <cds-icon class="ms-2 text-danger cursor-pointer" shape="times-circle"\r
                                style="width: 20px; height: 20px;" solid\r
                                (click)="onRemoveApplicableDaysClicked($event, index)" nz-tooltip\r
                                nzTooltipTitle="{{'BUTTON.REMOVE'|translate}}"></cds-icon>\r
                        </div>\r
                    </div>\r
                </ng-container>\r
            </form>\r
        </div>\r
        <div class="col-12 mt-5" *ngIf="formApplicableDays.controls.length == 0">\r
            <nz-empty [nzNotFoundContent]="contentTpl" [nzNotFoundImage]="'./assets/images/empty/empty_list.png'">\r
                <ng-template #contentTpl>\r
                    <span>{{'PACS.PPERMISSION_TYPE_APPLICABLE_DAYS_NO_RULE'|translate}}</span>\r
                </ng-template>\r
            </nz-empty>\r
        </div>\r
    </div>\r
</div>\r
\r
<!-- FORM FIELD VALIDATION -->\r
<ng-template #controlValidationTemplate let-form let-control="control" let-isArray="isArray">\r
    <ng-container *ngIf="control.errors">\r
        <div class="invalid-feedback" style="display: initial;">\r
            <span\r
                *ngIf="control.errors.required">{{(isArray?'VALIDATION.MIN_ONE_SELECTED':'VALIDATION.REQUIRED')|translate}}</span>\r
            <span *ngIf="control.errors.numeric">{{'VALIDATION.POSITIVE_NUMBER'|translate}}</span>\r
            <span *ngIf="control.errors.unique">{{'ACCESS_RULES.HAS_CAPACITY_GROUP'|translate}}</span>\r
        </div>\r
    </ng-container>\r
</ng-template>`;var De=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var Le=`<nz-select nzMode="{{allowMulti==true?'multiple':'default'}}" nzPlaceHolder="{{'COMMON.SELECT_ONE'|translate}}"
       [nzAllowClear]="allowClear" [(ngModel)]="selectedValue" class="w-100" (ngModelChange)="onChanged($event)">
       <ng-container *ngFor="let day of days">
              <nz-option [nzLabel]="day.description|translate" [nzValue]="day.type"></nz-option>
       </ng-container>
</nz-select>`;var Ue=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var at=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},rt={provide:N,useExisting:S(()=>k),multi:!0},k=class{allowMulti=!1;allowClear=!1;onChange;selectedValue=[];days=fe;isDisabled=!1;constructor(){}writeValue(e){e&&(this.selectedValue=e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.isDisabled=e}ngOnInit(){}onChanged(e){this.onChange(this.selectedValue)}static ctorParameters=()=>[];static propDecorators={allowMulti:[{type:l}],allowClear:[{type:l}]}};k=at([c({selector:"armon-day-of-week-input",providers:[rt],template:Le,standalone:!0,imports:[f,p,D,x,d],styles:[Ue]})],k);var st=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},U=class{languageService;formBuilder;applicableDays=[];applicableDaysChange=new u;valid;validChange=new u;form;constructor(e,t){this.languageService=e,this.formBuilder=t}ngOnInit(){this.createForm()}createForm(){let e={applicableDays:this.formBuilder.array([])};if(this.form=this.formBuilder.group(e),!C(this.applicableDays)&&!X(this.applicableDays)){let t=this.form.get("applicableDays");this.applicableDays.map(n=>{t.push(this.createApplicableDaysForm(n))})}this.form.updateValueAndValidity(),this.form.valueChanges.subscribe(t=>{this.updateValid()}),this.watchForChanges(),this.updateValid()}get formValue(){let e=z.getEmptyModel();return Object.assign(e,this.form.value),e.createInstance(e,z,e)}updateValid(){this.valid=this.form.valid,this.validChange.emit(this.form.valid);let e=this.formApplicableDays.value;e.forEach(t=>{t.selectedAll==!0&&delete t.userFilter,delete t.selectedAll}),this.applicableDaysChange.emit(e)}get formApplicableDays(){return this.form.get("applicableDays")}changesUnsubscribe=new G;watchForChanges(){this.changesUnsubscribe.next("cleanup"),H(...this.formApplicableDays.controls.map((e,t)=>e.get("selectedAll").valueChanges.pipe(W(this.changesUnsubscribe),q(n=>({rowIndex:t,control:e,data:n}))))).subscribe(e=>{this.onValueChanged(e)})}onValueChanged(e){this.formApplicableDays.controls[e.rowIndex].get("selectedAll").value==!0?this.formApplicableDays.controls[e.rowIndex].get("userFilter").disable():this.formApplicableDays.controls[e.rowIndex].get("userFilter").enable()}createApplicableDaysForm(e=null){return e||(e={}),this.formBuilder.group({selectedAll:[{value:e.selectedAll,disabled:!1},[R.required]],userFilter:[{value:e.userFilter?e.userFilter:z.getEmptyModel(),disabled:e.selectedAll},[R.required]],days:[{value:e.days?e.days:[1,2,3,4,5],disabled:!1},[R.required]]})}onAddApplicableDaysClicked(e){this.form.get("applicableDays").push(this.createApplicableDaysForm()),this.form.updateValueAndValidity(),this.watchForChanges()}onRemoveApplicableDaysClicked(e,t){this.form.get("applicableDays").removeAt(t),this.form.updateValueAndValidity(),this.watchForChanges()}static ctorParameters=()=>[{type:ae},{type:ne}];static propDecorators={applicableDays:[{type:l}],applicableDaysChange:[{type:b}],valid:[{type:l}],validChange:[{type:b}]}};U=st([c({selector:"armon-pacs-ppermission-applicable-days",template:ze,standalone:!0,schemas:[$],imports:[f,oe,x,m,d,Q,re,h,de,be,k,p],styles:[De]})],U);var lt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},_=class{customMax;validate(e){return e.value>this.customMax?{customMax:!0}:null}static propDecorators={customMax:[{type:l}]}};_=lt([E({selector:"[customMax][formControlName],[customMax][formControl],[customMax][ngModel]",providers:[{provide:M,useExisting:_,multi:!0}],standalone:!0})],_);var ct=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},w=class{customMin;validate(e){return e.value<this.customMin?{customMin:!0}:null}static propDecorators={customMin:[{type:l}]}};w=ct([E({selector:"[customMin][formControlName],[customMin][formControl],[customMin][ngModel]",providers:[{provide:M,useExisting:w,multi:!0}],standalone:!0})],w);var je=`<nz-select nzMode="{{allowMulti==true?'multiple':'default'}}" nzPlaceHolder="{{'COMMON.SELECT_ONE'|translate}}"
  [nzAllowClear]="allowClear" [(ngModel)]="selectedValue" class="w-100" (ngModelChange)="onChanged($event)"
  [nzCustomTemplate]="selectedTemplate">
  <ng-container *ngFor="let day of days">
    <nz-option nzCustomContent [nzLabel]="day.description|translate" [nzValue]="day.type">
      <cds-icon [attr.shape]="day.icon" class="cds-icon-16 me-2"></cds-icon><span>{{day.description|translate}}</span>
    </nz-option>
  </ng-container>
</nz-select>
<ng-template #selectedTemplate let-selected>
  <cds-icon [attr.shape]="getIcon(selected.nzValue)"
    class="cds-icon-16 me-2"></cds-icon><span>{{selected.nzLabel|translate}}</span>
</ng-template>`;var Ye=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}
`;var mt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},ft={provide:N,useExisting:S(()=>T),multi:!0},T=class{allowMulti=!1;allowClear=!1;onChange;selectedValue=[];days=pe;isDisabled=!1;constructor(){}writeValue(e){e&&(this.selectedValue=e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.isDisabled=e}ngOnInit(){}getIcon(e){return this.days.find(t=>t.type==e).icon}onChanged(e){this.onChange(this.selectedValue)}static ctorParameters=()=>[];static propDecorators={allowMulti:[{type:l}],allowClear:[{type:l}]}};T=mt([c({selector:"armon-work-duration-type-input",providers:[ft],template:je,standalone:!0,imports:[f,p,D,x,d],styles:[Ye]})],T);var xt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},v=class extends ie{pacsService;interactionService;organizationUnitService;translate;ppermissionTypeId;ppermissionType;visibleComponent=!1;editMode=!1;unitPeriods=ce;pacsPPermissionWorkDurationType=le;approveListItems=[new I("","PACS.PPERMISSION_TYPE_APPROVEMENT_HR",!0,!1)];constructor(e,t,n,o){super(),this.pacsService=e,this.interactionService=t,this.organizationUnitService=n,this.translate=o}onModalInitialized(){super.onModalInitialized(),C(this.ppermissionTypeId)?(this.ppermissionType=B.getEmptyModel(),this.editMode=!1):this.editMode=!0,this.getRootOrganizationForApprove()}getRootOrganizationForApprove(){this.organizationUnitService.getChildrenOfOrganizationUnit().subscribe(e=>{this.translate.get(["PACS.PPERMISSION_TYPE_APPROVEMENT_MNGR_OF"]).subscribe(t=>{e.forEach(n=>{this.approveListItems.push(new I(n.id,n.name+" "+t["PACS.PPERMISSION_TYPE_APPROVEMENT_MNGR_OF"],!1))}),this.editMode?this.pacsService.getPPermissionType(this.ppermissionTypeId).subscribe({next:n=>{this.ppermissionType=n,this.visibleComponent=!0},error:n=>{}}):this.visibleComponent=!0})},e=>{})}onSaveClicked(e){var t=B.getRequestModel(this.ppermissionType);this.pacsService.upsertPPermissionType(t).subscribe({next:n=>{this.closeModal(),this.interactionService.showMessage("PACS.MESSAGE_SAVED_PPERMISSION_TYPE",null,te.Success)},error:n=>{n&&n.status&&n.status===ee.Conflict&&this.interactionService.showDialog("PACS.ADD_PPERMISSION_TYPE","PACS.DIRECTION_PPERMISSION_TYPE_CONFLICT",null,null,!1,"BUTTON.OK","",!1,()=>{})}})}isDailyScheduledChanged(e){this.ppermissionType.isDailyScheduled==!1&&this.ppermissionType.minValue==0&&(this.ppermissionType.minValue=1)}onLessThanOneUnitEnabled(e){this.ppermissionType.lessThanOneUnitEnabled?this.ppermissionType.minValue!=0&&(this.ppermissionType.minValue=0):this.ppermissionType.minValue==0&&(this.ppermissionType.minValue=1)}static ctorParameters=()=>[{type:g},{type:y},{type:xe},{type:O}];static propDecorators={ppermissionTypeId:[{type:l}]}};v=xt([c({selector:"armon-ppermission-type-upsert-modal",template:Oe,standalone:!0,imports:[m,f,ue,Te,K,w,_,he,d,L,U,T,p],styles:[Ae]})],v);var Fe=`<div class="card mb-4">
    <div class="card-header px-4 d-flex">
        <span class="fw-medium text-md text-primary">{{ppermissionType.name}}</span>
        <armon-icon-label *ngIf="ppermissionType.preDefined" [colorCode]="3" class="ms-auto me-0">
            <ng-template icon-label-icon>
                <cds-icon shape="bundle"></cds-icon>
            </ng-template>
            <ng-template icon-label-content><span>{{'PACS.PPERMISSION_TYPE_PREDEFINED'|translate}}</span></ng-template>
        </armon-icon-label>
    </div>
    <div class="card-body">
        <div class="d-flex column-gap-1 text-sm fw-medium fst-italic text-danger mb-2"
            *ngIf="ppermissionType.isPassive">
            <cds-icon shape="exclamation-triangle" solid="true" class="cds-icon-14"></cds-icon>
            {{"PACS.DIRECTION_PPERMISSION_TYPE_PASSIVE"|translate}}
        </div>
        <div class="d-flex flex-column row-gap-2">
            <div class="d-flex column-gap-2 align-items-center mt-2 mb-4" style="width: fit-content;" nz-tooltip
                nzTooltipTitle="{{'PACS.PPERMISSION_TYPE_WORKPLAN_TYPE' | translate}}">
                <cds-icon [attr.shape]="ppermissionType.methodDefinition.icon" size="lg"
                    class="color-gray-dark"></cds-icon>
                <span class="text-md color-gray-dark fw-medium">{{ppermissionType.methodDefinition.description |
                    translate}}</span>
            </div>
            <div class="d-flex column-gap-2 align-items-center">
                <cds-icon [attr.shape]="ppermissionType.isDailyScheduled ? 'calendar':'clock'" size="md"
                    class="color-gray"></cds-icon>
                <span class="text-sm color-gray-dark">{{ppermissionType.isDailyScheduled ?
                    ('PACS.PPERMISSION_TYPE_UNIT_DAY' | translate)
                    :('PACS.PPERMISSION_TYPE_UNIT_HOUR'
                    | translate)}}</span>
            </div>
            <div class="d-flex column-gap-2 align-items-center">
                <cds-icon shape="users" size="md" class="color-gray"></cds-icon>
                <div class="d-flex column-gap-1">
                    <span class="text-sm color-gray-dark comma"
                        *ngIf="ppermissionType.hrCanInit">{{'PACS.PPERMISSION_TYPE_HR_CAN_INIT' | translate}}</span>
                    <span class="text-sm color-gray-dark comma"
                        *ngIf="ppermissionType.unitManagerCanInit">{{'PACS.PPERMISSION_TYPE_MANAGER_CAN_INIT' |
                        translate}}</span>
                    <span class="text-sm color-gray-dark comma"
                        *ngIf="ppermissionType.personnelCanInit">{{'PACS.PPERMISSION_TYPE_USER_CAN_INIT' |
                        translate}}</span>
                </div>
            </div>
            <div class="d-flex column-gap-2 align-items-center">
                <cds-icon shape="organization" size="md" class="color-gray"></cds-icon>
                <span class="text-sm color-gray-dark">{{ppermissionType.requireApprovement ?
                    ('PACS.PPERMISSION_TYPE_APPROVEMENT_REQ' | translate)
                    :('PACS.PPERMISSION_TYPE_APPROVEMENT_NOT_REQ'
                    | translate)}}</span>
            </div>
        </div>
        <!--
            
        <div class="type-tag-container">
            <div class="type-tag" type="4" selected="true">
                <div class="icon-container">
                    <cds-icon shape="users" size="md" solid></cds-icon>
                </div>
                <div class="title-container" style="line-height: 14px;">
                    <span *ngIf="ppermissionType.hrCanInit">{{'PACS.PPERMISSION_TYPE_HR_CAN_INIT' | translate}}</span>
                    <span *ngIf="ppermissionType.unitManagerCanInit">{{'PACS.PPERMISSION_TYPE_MANAGER_CAN_INIT' |
                        translate}}</span>
                    <span *ngIf="ppermissionType.personnelCanInit">{{'PACS.PPERMISSION_TYPE_USER_CAN_INIT' |
                        translate}}</span>
                </div>
            </div>
        </div>
        <div class="type-tag-container">
            <div class="type-tag" type="5" [attr.selected]="ppermissionType.requireApprovement">
                <div class="icon-container">
                    <cds-icon shape="organization" size="md" solid></cds-icon>
                </div>
                <div class="title-container">
                    <span>{{ppermissionType.requireApprovement ? ('PACS.PPERMISSION_TYPE_APPROVEMENT_REQ' | translate)
                        :('PACS.PPERMISSION_TYPE_APPROVEMENT_NOT_REQ'
                        | translate)}}</span>
                </div>
            </div>
        </div>
    -->
    </div>
    <div class="card-footer">
        <button class="btn btn-sm btn-link" (click)="editType($event)">{{'BUTTON.EDIT'|translate}}</button>
        <button class="btn btn-sm btn-link" (click)="deleteType($event)"
            *ngIf="!ppermissionType.preDefined">{{'BUTTON.DELETE'|translate}}</button>
    </div>
</div>`;var Ve=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .card-header{padding:12px}:host .passive-alert{margin:3px}:host .type-tag-container{display:inline-block}@media screen and (max-width: 576px){:host .type-tag-container{width:100%}}:host .type-tag-container .type-tag[type="1"][selected=true]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=true]{flex:1}}:host .type-tag-container .type-tag[type="1"][selected=true] .icon-container{padding:6px 12px;height:42px;background-color:#f9fbf4;color:#c4d492;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=true] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="1"][selected=true] .title-container{padding:6px 12px;height:42px;color:#88a825;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=true] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="1"][selected=true] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="1"][selected=false]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=false]{flex:1}}:host .type-tag-container .type-tag[type="1"][selected=false] .icon-container{padding:6px 12px;height:42px;background-color:#fbfaf9;color:#d3d1bf;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=false] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="1"][selected=false] .title-container{padding:6px 12px;height:42px;color:#a7a37e;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="1"][selected=false] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="1"][selected=false] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="2"][selected=true]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=true]{flex:1}}:host .type-tag-container .type-tag[type="2"][selected=true] .icon-container{padding:6px 12px;height:42px;background-color:#f9fbf4;color:#c4d492;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=true] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="2"][selected=true] .title-container{padding:6px 12px;height:42px;color:#88a825;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=true] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="2"][selected=true] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="2"][selected=false]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=false]{flex:1}}:host .type-tag-container .type-tag[type="2"][selected=false] .icon-container{padding:6px 12px;height:42px;background-color:#fbfaf9;color:#d3d1bf;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=false] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="2"][selected=false] .title-container{padding:6px 12px;height:42px;color:#a7a37e;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="2"][selected=false] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="2"][selected=false] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="3"][selected=true]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=true]{flex:1}}:host .type-tag-container .type-tag[type="3"][selected=true] .icon-container{padding:6px 12px;height:42px;background-color:#faf3f6;color:#c888a3;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=true] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="3"][selected=true] .title-container{padding:6px 12px;height:42px;color:#911146;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=true] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="3"][selected=true] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="3"][selected=false]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=false]{flex:1}}:host .type-tag-container .type-tag[type="3"][selected=false] .icon-container{padding:6px 12px;height:42px;background-color:#fdf6f5;color:#e7a598;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=false] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="3"][selected=false] .title-container{padding:6px 12px;height:42px;color:#cf4a30;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="3"][selected=false] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="3"][selected=false] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="4"][selected=true]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=true]{flex:1}}:host .type-tag-container .type-tag[type="4"][selected=true] .icon-container{padding:6px 12px;height:42px;background-color:#f2f7f9;color:#82b1c0;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=true] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="4"][selected=true] .title-container{padding:6px 12px;height:42px;color:#046380;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=true] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="4"][selected=true] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="4"][selected=false]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=false]{flex:1}}:host .type-tag-container .type-tag[type="4"][selected=false] .icon-container{padding:6px 12px;height:42px;background-color:#f2f7f9;color:#82b1c0;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=false] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="4"][selected=false] .title-container{padding:6px 12px;height:42px;color:#046380;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="4"][selected=false] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="4"][selected=false] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="5"][selected=true]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=true]{flex:1}}:host .type-tag-container .type-tag[type="5"][selected=true] .icon-container{padding:6px 12px;height:42px;background-color:#f9fbf4;color:#c4d492;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=true] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="5"][selected=true] .title-container{padding:6px 12px;height:42px;color:#88a825;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=true] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="5"][selected=true] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}:host .type-tag-container .type-tag[type="5"][selected=false]{font-size:.714rem;margin:3px;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=false]{flex:1}}:host .type-tag-container .type-tag[type="5"][selected=false] .icon-container{padding:6px 12px;height:42px;background-color:#fbfaf9;color:#d3d1bf;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=false] .icon-container{padding:0 6px}}:host .type-tag-container .type-tag[type="5"][selected=false] .title-container{padding:6px 12px;height:42px;color:#a7a37e;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 576px){:host .type-tag-container .type-tag[type="5"][selected=false] .title-container{flex:1;padding:0 6px}}:host .type-tag-container .type-tag[type="5"][selected=false] .title-container span{font-size:.714rem;text-align:left;font-weight:400!important}
`;var yt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},j=class{pacsService;interactionService;modalService;ppermissionType;typeDeleted=new u;constructor(e,t,n){this.pacsService=e,this.interactionService=t,this.modalService=n}ngOnInit(){}ngOnDestroy(){}editType(e){this.interactionService.showDialog("PACS.EDIT_PPERMISSION_TYPE","PACS.DIALOG_EDIT_PPERMISSION_TYPE",null,null,!0,"BUTTON.EDIT","",!1,()=>{this.modalService.open(v,{settings:{size:"lg",scrollable:!0,centered:!1},props:{ppermissionTypeId:this.ppermissionType.id}}).result.then(t=>{this.pacsService.getPPermissionType(this.ppermissionType.id).subscribe(n=>{this.ppermissionType=n},n=>{})}).catch(t=>{})})}deleteType(e){this.interactionService.showDialog(this.ppermissionType.name,"PACS.DIALOG_DELETE_PPERMISSION_TYPE",null,null,!0,"BUTTON.DELETE","",!0,()=>{this.pacsService.deletePPermissionType(this.ppermissionType.id).subscribe(()=>{this.typeDeleted.emit()})})}static ctorParameters=()=>[{type:g},{type:y},{type:A}];static propDecorators={ppermissionType:[{type:l}],typeDeleted:[{type:b}]}};j=yt([c({selector:"armon-pacs-ppermission-type-list-item",template:Fe,standalone:!0,imports:[m,h,Ie,ve,Pe,p],styles:[Ve]})],j);var Be=`<div class="form-group">
    <label *ngIf="title && title!=''" class="report-form-label">{{title | translate}}</label>
    <div class="filter-container">
        <cds-icon shape="times" *ngIf="text && text.length > 0" class="search-input-delete-icon"
            (click)="emptyFilter($event)"></cds-icon>
        <cds-icon shape="search" *ngIf="text && text.length > 0" class="search-input-search-icon"
            (click)="changeFilter($event)"></cds-icon>
        <input class="form-control form-control-sm" type="text" id="textInput" maxlength="255" [(ngModel)]="text"
            (keyup.enter)="changeFilter($event)">
    </div>
</div>`;var Ge=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}:host .filter-container{position:relative}:host .filter-container .search-input-delete-icon{position:absolute;right:6px;top:.35rem;cursor:pointer}:host .filter-container .search-input-search-icon{position:absolute;right:26px;top:.35rem;cursor:pointer}:host .filter-container input{padding-right:50px}
`;var vt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},Y=class{title="";filterChanged=new u;text="";constructor(){}ngOnInit(){}ngOnDestroy(){}changeFilter(e){this.filterChanged.emit(this.text)}emptyFilter(e){this.text="",this.filterChanged.emit(this.text)}static ctorParameters=()=>[];static propDecorators={title:[{type:l}],filterChanged:[{type:b}]}};Y=vt([c({selector:"armon-pacs-filter-text",template:Be,standalone:!0,imports:[m,f,x,p],styles:[Ge]})],Y);var Pt=function(r,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},qe=class{pacsService;modalService;visibleComponent=!1;activeFilterOptions;types=[];request;paginationResponse=new se;constructor(e,t){this.pacsService=e,this.modalService=t}ngOnInit(){this.activeFilterOptions=[{value:null,i18nName:"PACS.ALL"},{value:!1,i18nName:"PACS.PPERMISSION_TYPE_ACTIVE_FILTER"},{value:!0,i18nName:"PACS.PPERMISSION_TYPE_NOT_ACTIVE_FILTER"}],this.visibleComponent=!0,this.setRequest(),this.getPPermissionTypes()}ngOnDestroy(){}setRequest(){this.request=me.getEmptyModel()}getPPermissionTypes(){this.pacsService.getPPermissionTypeList(this.request).subscribe(e=>{this.types=e.items,this.paginationResponse=e.pagination})}refreshList(){this.types=[],this.getPPermissionTypes()}addPPermissionType(e){this.modalService.open(v,{settings:{size:"lg",scrollable:!0,centered:!1}}).result.then(t=>{this.refreshList()}).catch(t=>{})}onTypeDeleted(e){this.refreshList()}pageChanged(e){this.request.pagination=e,this.refreshList()}activeFilterChanged(e){this.request.isPassive=e.value,this.refreshList()}nameFilterChanged(e){this.request.name=e,this.refreshList()}static ctorParameters=()=>[{type:g},{type:A}]};qe=Pt([c({selector:"armon-pacs-ppermission-type-list",template:Ee,animations:ge,standalone:!0,imports:[m,we,ke,Se,Y,_e,d,j,ye,p],styles:[Ce]})],qe);export{qe as PacsPPermissionTypeListComponent};
