package com.ffii.fpsms.modules.master.print

object A4PrintDriverRegistry {
    private val drivers = mapOf(
        "Canon" to CanonA4Driver(),
        "Brother" to BrotherA4Driver(),
    )
    private val defaultDriver = CanonA4Driver()

    /**
     * Returns the A4 driver for the given brand.
     * Null/blank/unknown brand => Canon (backward compatible).
     */
    fun getDriver(brand: String?): A4PrintDriver {
        if (brand.isNullOrBlank()) return defaultDriver
        return drivers[brand.trim()] ?: defaultDriver
    }
}