package app.termora.plugin.internal.telnet

import app.termora.*
import app.termora.actions.DataProvider
import app.termora.protocol.GenericProtocolProvider

internal class TelnetProtocolProvider private constructor() : GenericProtocolProvider {
    companion object {
        val instance by lazy { TelnetProtocolProvider() }
        const val PROTOCOL = "Telnet"
    }

    override fun getProtocol(): String {
        return PROTOCOL
    }

    override fun createTerminalTab(dataProvider: DataProvider, windowScope: WindowScope, host: Host): TerminalTab {
        return TelnetTerminalTab(windowScope, host)
    }

    override fun getIcon(width: Int, height: Int): DynamicIcon {
        return Icons.telnet
    }

    override fun ordered() = Int.MIN_VALUE
}