package configure

import (
	"github.com/spf13/cobra"

	"gitea.sunhpc.com/kelvin/sunhpc/internal/app/control/configure/dhcp"
)

var (
	baseCmd = &cobra.Command{
		DisableFlagsInUseLine: true,
		Use:   "config [options]",
		Short: "Manage sunhpc configuration",
		Long: "This application allows you to manage and initialize Sunhpc configuration\n" + 
				"services based on the configuration in the sunhpc.conf file.",
		RunE: CobraRunE,
		Args: cobra.NoArgs,
	}
	allFunctions bool
)

func init() {
	baseCmd.AddCommand(dhcp.GetCommand())
	baseCmd.Flags().BoolVarP(&allFunctions, "all", "a", false, "Configure all services")
}

// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
	return baseCmd
}
