define([], function() { return "import * as React from 'react';\nimport {\n  GroupedList\n} from './GroupedList';\nimport {\n  IListProps\n} from '../List';\n\nimport {\n  IDragDropContext,\n  IDragDropEvents,\n  IDragDropHelper\n} from '../../utilities/dragdrop/index';\nimport {\n  ISelection,\n  SelectionMode\n} from '../../utilities/selection/index';\nimport { IViewport } from '../../utilities/decorators/withViewport';\n\nexport interface IGroupedList {\n  /**\n   * Ensures that the list content is updated. Call this in cases where the list prop updates don't change, but the list\n   * still needs to be re-evaluated. For example, if a sizer bar is adjusted and causes the list width to change, you can\n   * call this to force a re-evaluation. Be aware that this can be an expensive operation and should be done sparingly.\n   */\n  forceUpdate: () => void;\n}\n\nexport interface IGroupedListProps extends React.Props<GroupedList> {\n  /** Optional class name to add to the root element. */\n  className?: string;\n\n  /** Map of callback functions related to drag and drop functionality. */\n  dragDropEvents?: IDragDropEvents;\n\n  /** helper to manage drag/drop across item and groups */\n  dragDropHelper?: IDragDropHelper;\n\n  /** Event names and corresponding callbacks that will be registered to groups and rendered elements */\n  eventsToRegister?: [{ eventName: string, callback: (context: IDragDropContext, event?: any) => void }];\n\n  /** Optional override properties to render groups. */\n  groupProps?: IGroupRenderProps;\n\n  /** Optional grouping instructions. */\n  groups?: IGroup[];\n\n  /** List of items to render. */\n  items: any[];\n\n  /** Optional properties to pass through to the list components being rendered. */\n  listProps?: IListProps;\n\n  /** Rendering callback to render the group items. */\n  onRenderCell: (\n    nestingDepth?: number,\n    item?: any,\n    index?: number\n    ) => React.ReactNode;\n\n  /** Optional selection model to track selection state.  */\n  selection?: ISelection;\n\n  /** Controls how/if the list manages selection. */\n  selectionMode?: SelectionMode;\n\n  /** Optional Viewport, provided by the parent component. */\n  viewport?: IViewport;\n}\n\nexport interface IGroup {\n  /**\n   * Unique identifier for the group.\n   */\n  key: string;\n\n  /**\n   * Display name for the group, rendered on the header.\n   */\n  name: string;\n\n  /**\n   * Start index for the group within the given items.\n   */\n  startIndex: number;\n\n  /**\n   * How many items should be rendered within the group.\n   */\n  count: number;\n\n  /**\n   * Nested groups, if any.\n   */\n  children?: IGroup[];\n\n  /**\n   * Number indicating the level of nested groups.\n   */\n  level?: number;\n\n  /**\n   * If all the items in the group are selected.\n   */\n  isSelected?: boolean;\n\n  /**\n   * If all the items in the group are collapsed.\n   */\n  isCollapsed?: boolean;\n\n  /**\n   * If the items within the group are summarized or showing all.\n   */\n  isShowingAll?: boolean;\n\n  /**\n   * If drag/drop is enabled for the group header.\n   */\n  isDropEnabled?: boolean;\n\n  /**\n   * Arbitrary data required to be preserved by the caller.\n   */\n  data?: any;\n\n  /**\n   * Override which allows the caller to provide a custom header.\n   */\n  onRenderHeader?: (group: IGroup) => React.ReactNode;\n\n  /**\n   * Override which allows the caller to provider a customer footer.\n   */\n  onRenderFooter?: (group: IGroup) => React.ReactNode;\n}\n\nexport interface IGroupRenderProps {\n  /** Boolean indicating if all groups are in collapsed state. */\n  isAllGroupsCollapsed?: boolean;\n\n  /** Grouping item limit. */\n  getGroupItemLimit?: (group: IGroup) => number;\n\n  /** Callback for when all groups are expanded or collapsed. */\n  onToggleCollapseAll?: (isAllCollapsed: boolean) => void;\n\n  /** Information to pass in to the group header. */\n  headerProps?: IGroupHeaderProps;\n\n  /** Information to pass in to the group footer. */\n  footerProps?: IGroupFooterProps;\n}\n\nexport interface IGroupHeaderProps {\n  /** Callback to determine if a group has missing items and needs to load them from the server. */\n  isGroupLoading?: (group: IGroup) => boolean;\n\n  /** Text shown on group headers to indicate the group is being loaded. */\n  loadingText?: string;\n\n  /** Callback for when the group header is clicked. */\n  onGroupHeaderClick?: (group: IGroup) => void;\n\n  /** Callback for when the group is expanded or collapsed. */\n  onToggleCollapse?: (group: IGroup) => void;\n\n  /** Callback for when the group is selected. */\n  onToggleSelectGroup?: (group: IGroup) => void;\n}\n\nexport interface IGroupFooterProps {\n  /** Callback for when the \"Show All\" link in group footer is clicked */\n  onToggleSummarize?: (group: IGroup) => void;\n\n  /** Text to display for the group footer show all link. */\n  showAllLinkText?: string;\n}\n\n"; });