react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
108 lines (101 loc) • 3.64 kB
text/typescript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/common/CameraPermission.yaml
import {
BackgroundStyle,
ButtonConfiguration,
ForegroundStyle,
IconStyle,
StyledText,
} from '../../ui_v2/common/Common';
import { StatusBarMode } from '../../ui_v2/common/TopBarConfiguration';
import { DeepPartial, PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the camera permission request view.
*/
export class CameraPermissionScreen extends PartiallyConstructible {
/**
Determines the visual mode for displaying the contents of the status bar.
Default is DARK
*/
public statusBarMode: StatusBarMode = 'DARK';
/**
The background color of the camera permission request.
Default is "?sbColorSurface"
*/
public background: string = '?sbColorSurface';
/**
The background color of the icon used in the camera permission request.
Default is "?sbColorOutline"
*/
public iconBackground: string = '?sbColorOutline';
/**
Configuration of the icon used in the camera permission request.
*/
public icon: IconStyle = new IconStyle({ color: '?sbColorOnSurface' });
/**
Configuration of the camera permission request's confirmation button.
*/
public enableCameraButton: ButtonConfiguration = new ButtonConfiguration({
text: '?cameraPermissionEnableCameraButton',
background: new BackgroundStyle({
strokeColor: '?sbColorPrimary',
fillColor: '?sbColorPrimary',
strokeWidth: 0.0,
}),
foreground: new ForegroundStyle({ iconVisible: false, color: '?sbColorOnPrimary' }),
});
/**
Configuration of the camera permission request's close button.
*/
public closeButton: ButtonConfiguration = new ButtonConfiguration({
text: '?cameraPermissionCloseButton',
background: new BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0,
}),
foreground: new ForegroundStyle({ iconVisible: false, color: '?sbColorPrimary' }),
});
/**
Configuration of the camera permission request's title.
*/
public enableCameraTitle: StyledText = new StyledText({
text: '?cameraPermissionEnableCameraTitle',
color: '?sbColorOnSurface',
});
/**
Configuration of the camera permission request's explanatory text.
*/
public enableCameraExplanation: StyledText = new StyledText({
text: '?cameraPermissionEnableCameraExplanation',
color: '?sbColorOnSurfaceVariant',
});
/** @param source {@displayType `DeepPartial<CameraPermissionScreen>`} */
public constructor(source: DeepPartial<CameraPermissionScreen> = {}) {
super();
if (source.statusBarMode !== undefined) {
this.statusBarMode = source.statusBarMode;
}
if (source.background !== undefined) {
this.background = source.background;
}
if (source.iconBackground !== undefined) {
this.iconBackground = source.iconBackground;
}
if (source.icon !== undefined) {
this.icon = new IconStyle(source.icon);
}
if (source.enableCameraButton !== undefined) {
this.enableCameraButton = new ButtonConfiguration(source.enableCameraButton);
}
if (source.closeButton !== undefined) {
this.closeButton = new ButtonConfiguration(source.closeButton);
}
if (source.enableCameraTitle !== undefined) {
this.enableCameraTitle = new StyledText(source.enableCameraTitle);
}
if (source.enableCameraExplanation !== undefined) {
this.enableCameraExplanation = new StyledText(source.enableCameraExplanation);
}
}
}