package network

import (
	"time"

	"github.com/urfave/cli/v2"
)

// BaseOption holds the base options
type BaseOption struct {
	Timeout time.Duration
}

// NewBaseOption is the factory method for BaseOption
func NewBaseOption(ctx *cli.Context) (*BaseOption, error) {
	return &BaseOption{}, nil
}

// NetworkOption holds the network scanner options
type NetworkOption struct {
	*BaseOption
}

// NewNetworkOption is the factory method for NetworkOption
func NewNetworkOption(ctx *cli.Context) (*NetworkOption, error) {
	opt, err := NewBaseOption(ctx)
	if err != nil {
		return nil, err
	}

	return &NetworkOption{
		BaseOption: opt,
	}, nil
}
