You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
"marmic/servicetrade-toolbox/internal/api"
|
|
"marmic/servicetrade-toolbox/internal/ui"
|
|
"marmic/servicetrade-toolbox/internal/utils"
|
|
)
|
|
|
|
func HandleGenericTools(session *api.Session) {
|
|
for {
|
|
ui.ClearScreen()
|
|
fmt.Println("Generic Tools Menu:")
|
|
fmt.Println("1. Tool 1")
|
|
fmt.Println("2. Tool 2")
|
|
fmt.Println("3. Tool 3")
|
|
fmt.Println("4. Back to Main Menu")
|
|
|
|
choice, err := utils.GetUserChoice(4)
|
|
if err != nil {
|
|
ui.DisplayError("Invalid input:", err)
|
|
utils.PressEnterToContinue()
|
|
continue
|
|
}
|
|
switch choice {
|
|
case 1:
|
|
runTool1(session)
|
|
case 2:
|
|
runTool2(session)
|
|
case 3:
|
|
runTool3(session)
|
|
case 4:
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
func runTool1(session *api.Session) {
|
|
ui.ClearScreen()
|
|
fmt.Println("Running Tool 1...")
|
|
// TODO: Implement Tool 1 logic
|
|
utils.PressEnterToContinue()
|
|
}
|
|
|
|
func runTool2(session *api.Session) {
|
|
ui.ClearScreen()
|
|
fmt.Println("Running Tool 2...")
|
|
// TODO: Implement Tool 2 logic
|
|
utils.PressEnterToContinue()
|
|
}
|
|
|
|
func runTool3(session *api.Session) {
|
|
ui.ClearScreen()
|
|
fmt.Println("Running Tool 3...")
|
|
// TODO: Implement Tool 3 logic
|
|
utils.PressEnterToContinue()
|
|
}
|
|
|