\r\n {!this.props.cameraStreamAvailable &&\r\n
\r\n \r\n \r\n }\r\n
\r\n
{ this.photoCaptureElement = elem; }}>
\r\n {this.props.cameraStreamAvailable &&\r\n
\r\n
\r\n {state.showVideo && state.cameraIds.length > 1 &&\r\n \r\n }\r\n {!state.showVideo &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n {state.showVideo &&\r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n }\r\n
\r\n );\r\n }\r\n}","// WhistleBlowAttachmentList - MODULE\r\n// ***********************************************************************************************************************\r\nimport downloadjs from \"downloadjs\";\r\nimport * as React from \"react\";\r\nimport { Base } from \"ui/Scripts/source/framework/base\";\r\nimport { FileAttachment, IFileAttachment } from \"ui/Scripts/source/models/common/fileAttachment\";\r\nimport { Translations } from \"ui/Scripts/source/models/translations\";\r\nimport { AppUtils } from \"../../../framework/appUtils\";\r\nimport * as whistleBlowService from \"../../../models/services/whistleBlowService\";\r\nimport { AttachmentList } from \"../../attachment\";\r\nimport { CameraPhoto } from \"../../framework/CameraPhoto\";\r\n\r\n// WhistleBlowAttachmentList\r\nexport interface IWhistleBlowAttachmentListProp {\r\n accept?: string;\r\n isReadOnly?: boolean;\r\n companyId: string;\r\n whistleBlowId: string;\r\n maxAttachmentsTotalSize: number;\r\n attachments: IFileAttachment[];\r\n onShowCamera: (value: boolean) => void;\r\n onRemoved: (ids: string[]) => void;\r\n onAdded: (attachments: IFileAttachment[]) => void;\r\n}\r\n\r\nexport interface IWhistleBlowAttachmentListState {\r\n cameraIds: string[];\r\n showCamera: boolean;\r\n showingCamera: boolean;\r\n}\r\n\r\nexport const WhistleBlowAttachmentList = ({ attachments, companyId, maxAttachmentsTotalSize, onAdded, onRemoved, onShowCamera, whistleBlowId, accept, isReadOnly }: IWhistleBlowAttachmentListProp) => {\r\n const [state, setState] = React.useState