package imports

import (
	"k8s.io/apimachinery/pkg/api/resource"

	cloudv1 "github.com/tidbcloud/infra-api/api/v1"
)

const (
	TiDBLightningComName = "tidb-lightning"
)

type lightning struct {
	replicas     int
	instanceType string
}

func (c *lightning) NeedSuspend(base *cloudv1.SuspendAction) bool {
	return false
}
func (c *lightning) GetSuspendActions(base *cloudv1.SuspendAction) *cloudv1.SuspendAction {
	return nil
}

func (c *lightning) GetReplicas() int {
	return c.replicas
}

func (c *lightning) GetInstanceType() string {
	return c.instanceType
}

func (c *lightning) GetComponentType() cloudv1.ComponentType {
	return TiDBLightningComName
}

func (c *lightning) GetStorageClassName() (string, bool) {
	return "", false
}

func (c *lightning) GetStorageSize() (*resource.Quantity, bool) {
	return nil, false
}

func (c *lightning) GetUseLocalStorage() bool {
	return false
}

func (c *lightning) SetReplicas(replicas int) {
	c.replicas = replicas
}

func (c *lightning) SetInstanceType(instanceType string) {
	c.instanceType = instanceType
}

func (c *lightning) SetStorageClassName(className string) {
	panic("not supported")
}

func (c *lightning) SetStorageSize(size resource.Quantity) {
	panic("not supported")
}

func (c *lightning) SetUseLocalStorage(useLocalStorage bool) {
	panic("not supported")
}
