import { Form } from '../../e2elib/lib/src/pageobjects/form.component'; 
 | 
import { DialogStrategy } from '../dialogs/dialog.strategy'; 
 | 
import { ListSOP } from '../../libappsop/listsop'; 
 | 
  
 | 
export class FormOptimizerStrategies extends Form { 
 | 
  public listStrategy = new ListStrategy(); 
 | 
  
 | 
  public constructor() { 
 | 
    super('FormOptimizerStrategiesSlideIn'); 
 | 
  } 
 | 
} 
 | 
  
 | 
export class ListStrategy extends ListSOP<DialogStrategy, ListStrategyColumn> { 
 | 
  public static readonly title = 'Optimizer Strategies'; 
 | 
  
 | 
  public constructor() { 
 | 
    super('ListOptimizerStrategiesSlideIn', new DialogStrategy()); 
 | 
  } 
 | 
  
 | 
  /** 
 | 
   * Returns the copied strategy name by appending Copy and running number. 
 | 
   * Prevents spec files hardcoding the copied format so that future changes to the logic can be change here. 
 | 
   * 
 | 
   * @param originalName Strategy name to copy 
 | 
   * @param suffixRunningNumber [Optional] Number to append in case original strategy has been copied before to prevent duplicate name 
 | 
   * @returns The new copied strategy name. 
 | 
   * @example Default_Copy, Default_Copy 1, Default_Copy 2 (with a space before number) 
 | 
   */ 
 | 
  public getCopiedStrategyName(originalName: string, suffixRunningNumber?: number): string { 
 | 
    const suffix = suffixRunningNumber ? suffixRunningNumber.toString() : ''; 
 | 
    return `${originalName}_Copy${suffix}`; 
 | 
  } 
 | 
} 
 | 
  
 | 
export interface ListStrategyColumn { 
 | 
  Name?: string; 
 | 
  ImgIsValid?: string; 
 | 
} 
 | 
  
 | 
const listStrategyContextMenuItem = { 
 | 
  Create: { ContextMenu: 'listContextMenuOptimizerStrategiesSlideIn', Name: 'MenuCreate', Label: 'Create' }, 
 | 
  Edit: { ContextMenu: 'listContextMenuOptimizerStrategiesSlideIn', Name: 'MenuEdit', Label: 'Edit' }, 
 | 
  Delete: { ContextMenu: 'listContextMenuOptimizerStrategiesSlideIn', Name: 'MenuDelete', Label: 'Delete' }, 
 | 
  Copy: { ContextMenu: 'listContextMenuOptimizerStrategiesSlideIn', Name: 'MenuCopy', Label: 'Copy' }, 
 | 
}; 
 | 
  
 | 
export { listStrategyContextMenuItem as ListStrategyContextMenuItem }; 
 |