import { TSVueIcons } from 'v2/Icon/Icon.vue.d'; import { TSButtonProps } from 'v2/Button/Button.vue.d'; import { ClassComponent } from '../ts-helpers'; export type ScannerErrorCode = | 'DRIVER_NOT_FOUND' | 'DEVICE_NOT_CONNECTED' | 'DEVICE_DISCONNECTED' | 'NOT_SUPPORTED_SYSTEM' | 'HARDWARE_NOT_SYNCHRONIZED'; export type ScannerErrorMessage = { title: string; detail: string; }; export type Device = { jenisDevice: string; serialNumber: string; API: string; rfidScan: boolean; qrScan: boolean; name: string; }; export type BaseRegisteredDevice = { _id: string; serialNumber: string; name: string; }; export type RegisteredDevice = { _id: string; imageSmall: string; imageBig: string; serialNumber: string; status: string; lastReportDate: string; createdAt: string; updatedAt: string; group: null; name: string; }; export type DeviceList = Device[]; export interface ButtonScanProps extends TSButtonProps { /** * Set custom button label. * * @default Scan Type */ label?: string; /** * Set custom button icon. * * @default 'qr' | 'rfid' */ icon?: TSVueIcons; /** * Scpecify the scan type */ type?: 'RFID' | 'QR'; /** * Automatically switch between RFID and QR scan types during the scanning process. * This allows the scan type to change dynamically based on the validation of the scanned code. * * The scan type will alternate between RFID and QR based on the validation result: * - If the current scan is valid, it proceeds with the next scan type. * - If the scan is invalid, it will re-scan using the previous scan type. * * This behavior continues in a loop until a stop condition is met, typically triggered by the parent component. * * Note: Only work with single Scan * * @default false * @type {boolean} * * @example * // Example usage in a component: *