import * as React from 'react';
import { CaptureItem } from './index.d';

export type ItemConfigKey = 'faceRecord' | 'bodyRecord' | 'personFile' | 'relationMap' | 'faceSearch' | 'bodySearch' | 'vehicleTrajectory' | 'vehicleSearch' | 'nonVehicleSearch';
export type DepsKey = 'aid' | 'cid' | 'hasArchives' | 'personId' | 'imgId' | 'faceFeature' | 'captureVehicleId' | 'imgUrl' | 'bodyFeature' | 'nonVehicleFeature' | 'vehicleFeature';
export type ConditionKey = 'and' | 'or';

export type ItemConfigType = {
  [key in ItemConfigKey]: {
    deps: Array<Array<DepsKey>>;
    ItemComponent: React.FunctionComponent<ItemProps>;
    condition: ConditionKey;
  };
};

interface ItemProps extends CaptureItem {
  typeKey: ItemConfigKey;
  linkConfig: ItemConfigType;
}

declare const LinkItem: React.FunctionComponent<ItemProps>;

export default LinkItem;
