export interface PosState { screen: 'amount-entry' | 'qr-code' | 'processing' | 'success' | 'error'; amount: string; currency: 'SAR'; qrCode?: string; transactionId?: string; } export interface PaymentLinkRequest { amount: number; title?: string; singleUse?: boolean; description?: string; selectedDate?: string; client_first_name?: string; client_last_name?: string; client_email?: string; client_phone_number?: string; client_street1?: string; client_street2?: string; client_city?: string; client_state?: string; client_country?: string; client_postcode?: string; address_required?: boolean; language?: string; sms_language?: string; send_sms?: boolean; passkey_enabled?: boolean; only_show_bank_installments?: boolean; only_show_pay_in_full?: boolean; callback_url?: string; metadata?: Record; } export interface PaymentLinkResponse { id: string; payment_link_id?: string; qr_code?: string; payment_url?: string; status?: string; } export declare class AmwalPos { /** * The current amount entered */ amount: string; /** * The currency used for the transaction. */ currency: 'SAR'; /** * The language of the plugin. Supported languages are Arabic ("ar") and English ("en") */ locale?: string; /** * Enable debug mode for additional console logs */ debug: boolean; /** * Minimum amount allowed */ minAmount: number; /** * Maximum amount allowed */ maxAmount: number; /** * API Authorization token */ authToken: string; /** * Store ID for API calls */ storeId: string; /** * API base URL */ apiBaseUrl: string; /** * Custom title for payment */ paymentTitle?: string; /** * Custom description for payment */ paymentDescription?: string; /** * Customer information */ customerFirstName?: string; customerLastName?: string; customerEmail?: string; customerPhone?: string; /** * Customer address information */ customerStreet1?: string; customerStreet2?: string; customerCity?: string; customerState?: string; customerCountry?: string; customerPostcode?: string; /** * Address and payment options */ addressRequired?: boolean; smsLanguage?: string; sendSms?: boolean; passkeyEnabled?: boolean; onlyShowBankInstallments?: boolean; onlyShowPayInFull?: boolean; /** * Callback URL for payment completion */ callbackUrl?: string; /** * Custom metadata for the transaction */ metadata?: string; /** * Component state */ currentScreen: 'amount-entry' | 'qr-code' | 'processing' | 'success' | 'error'; qrCodeData: string; qrCodeDataURL: string; transactionId: string; errorMessage: string; paymentUrl: string; isChecking: boolean; checkAttempts: number; /** * Translation function to handle localization * @private */ private t; /** * Lifecycle method that is called once when the component is first created */ componentWillLoad(): Promise; /** * Lifecycle method to update translations when locale changes * @param newValue */ updateLocale(newValue: string): Promise; /** * Handle number input */ private handleNumberInput; /** * Handle backspace */ private handleBackspace; /** * Handle continue to QR code screen */ private handleContinue; /** * Create transaction and generate QR code */ private createTransaction; /** * Generate QR code using the qrcode library */ private generateQRCode; /** * Handle cancel action */ private handleCancel; /** * Handle check status with automatic retries */ private handleCheckStatus; /** * Start payment monitoring with automatic retries */ private startPaymentMonitoring; /** * Perform a single status check */ private performStatusCheck; /** * Create payment link using Amwal API */ private createPaymentLink; /** * Check payment status */ private checkPaymentStatus; /** * Handle error state */ private handleError; /** * Check if amount is valid */ private isAmountValid; /** * Format amount display */ private formatAmountDisplay; /** * Get order ID from metadata */ private getOrderIdFromMetadata; /** * Render the tabby logo */ private renderLogo; /** * Render keypad */ private renderKeypad; /** * Render amount entry screen */ private renderAmountEntry; /** * Render QR code screen */ private renderQRCode; /** * Render processing screen */ private renderProcessing; /** * Render success screen */ private renderSuccess; /** * Render error screen */ private renderError; /** * Render component */ render(): any; }