import { FunctionAppEditMode } from 'app/shared/models/function-app-edit-mode' ; export class EditModeHelper { public static isReadOnly ( editMode ) { return ( editMode === FunctionAppEditMode . ReadOnly || editMode === FunctionAppEditMode . ReadOnlySourceControlled || editMode === FunctionAppEditMode . ReadOnlySlots || editMode === FunctionAppEditMode . ReadOnlyVSGenerated || editMode === FunctionAppEditMode . ReadOnlyRunFromZip || editMode === FunctionAppEditMode . ReadOnlyLocalCache || editMode === FunctionAppEditMode . ReadOnlyLinuxDynamic || editMode === FunctionAppEditMode . ReadOnlyBYOC || editMode === FunctionAppEditMode . ReadOnlyPython || editMode === FunctionAppEditMode . ReadOnlyJava || editMode === FunctionAppEditMode . ReadOnlyLinuxCodeElastic ) ; } public static getWarningIfForced ( editMode ) { if ( editMode === FunctionAppEditMode . ReadOnlyRunFromZip ) { return 'readOnlyRunFromZip' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyLocalCache ) { return 'readOnlyLocalCache' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyPython ) { return 'readOnlyPython' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyJava ) { return 'readOnlyJava' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyLinuxDynamic ) { return 'readOnlyLinuxDynamic' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyBYOC ) { return 'readOnlyBYOC' ; } else if ( editMode === FunctionAppEditMode . ReadOnlyLinuxCodeElastic ) { return 'readOnlyLinuxCodeElastic' ; } else { return null ; } } }