package ssh

import (
	

	gossh 
)

// PasswordAuth returns a functional option that sets PasswordHandler on the server.
func ( PasswordHandler) Option {
	return func( *Server) error {
		.PasswordHandler = 
		return nil
	}
}

// PublicKeyAuth returns a functional option that sets PublicKeyHandler on the server.
func ( PublicKeyHandler) Option {
	return func( *Server) error {
		.PublicKeyHandler = 
		return nil
	}
}

// HostKeyFile returns a functional option that adds HostSigners to the server
// from a PEM file at filepath.
func ( string) Option {
	return func( *Server) error {
		,  := os.ReadFile()
		if  != nil {
			return 
		}

		,  := gossh.ParsePrivateKey()
		if  != nil {
			return 
		}

		.AddHostKey()

		return nil
	}
}

func ( KeyboardInteractiveHandler) Option {
	return func( *Server) error {
		.KeyboardInteractiveHandler = 
		return nil
	}
}

// HostKeyPEM returns a functional option that adds HostSigners to the server
// from a PEM file as bytes.
func ( []byte) Option {
	return func( *Server) error {
		,  := gossh.ParsePrivateKey()
		if  != nil {
			return 
		}

		.AddHostKey()

		return nil
	}
}

// NoPty returns a functional option that sets PtyCallback to return false,
// denying PTY requests.
func () Option {
	return func( *Server) error {
		.PtyCallback = func( Context,  Pty) bool {
			return false
		}
		return nil
	}
}

// WrapConn returns a functional option that sets ConnCallback on the server.
func ( ConnCallback) Option {
	return func( *Server) error {
		.ConnCallback = 
		return nil
	}
}