import type { CashDrawerImpactMode, PaymentMethod, PaymentProvider } from "../enums.js"
import type {
    PaymentProviderDefinitionDto,
    PaymentProviderInputMap
} from "../payment-provider.definitions.js"

export interface PaymentProviderAccountDto {
    id: string
    provider: PaymentProvider
    label: string | null
    config: PaymentProviderInputMap
    configuredSecrets: string[]
    active: boolean
    createdAt: string
    updatedAt: string
}

export interface PaymentProviderDeviceDto {
    id: string
    accountPaymentProviderId: string
    accountPaymentProviderLabel: string | null
    provider: PaymentProvider
    externalId: string
    label: string | null
    active: boolean
}

export interface PaymentProviderAccountOptionDto {
    id: string
    label: string | null
    provider: PaymentProvider
    active: boolean
}

export interface PaymentProviderDeviceOptionDto {
    id: string
    label: string | null
    externalId: string
    active: boolean
    providerAccountId: string
    provider: PaymentProvider
}

export interface PaymentStationOptionDto {
    id: string
    name: string
}

export interface PaymentConfigMetaDto {
    providerAccounts: PaymentProviderAccountOptionDto[]
    providerDevices: PaymentProviderDeviceOptionDto[]
    stations: PaymentStationOptionDto[]
    providerDefinitions: PaymentProviderDefinitionDto[]
}

export interface ShopPaymentMethodConfigDto {
    id: string
    shopId: string
    method: PaymentMethod
    enabled: boolean
    displayOrder: number
    revision: number
    accountPaymentProviderId: string | null
    accountPaymentProviderLabel: string | null
    provider: PaymentProvider | null
    defaultProviderDeviceId: string | null
    defaultProviderDeviceLabel: string | null
    cashDrawerImpactMode: CashDrawerImpactMode
    createdAt: string
    updatedAt: string
}

export interface StationPaymentMethodConfigDto {
    id: string
    stationId: string
    stationName: string
    shopPaymentMethodConfigId: string
    method: PaymentMethod
    enabled: boolean
    displayOrder: number
    isDefault: boolean
    providerDeviceId: string | null
    providerDeviceLabel: string | null
    createdAt: string
    updatedAt: string
}
