package cmd

import (
	"github.com/deifyed/topbg/cmd/store"
	"github.com/spf13/cobra"
)

// storeCmd represents the store command
var (
	opts = struct {
		Name string
	}{}
	storeCmd = &cobra.Command{
		Use:   "store",
		Short: "Store the most recent topbg set background permanently",
		RunE:  store.RunE(log, fs, &opts.Name),
	}
)

func init() {
	rootCmd.AddCommand(storeCmd)

	// Here you will define your flags and configuration settings.

	// Cobra supports Persistent Flags which will work for this command
	// and all subcommands, e.g.:
	// storeCmd.PersistentFlags().String("foo", "", "A help for foo")

	// Cobra supports local flags which will only run when this command
	// is called directly, e.g.:
	// storeCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
	storeCmd.Flags().StringVarP(&opts.Name, "name", "n", "", "Store image with a certain name (default is UUID)")
}
