package d2target

import (
	
)

const (
	PrefixPadding = 10
	PrefixWidth   = 20
	CenterPadding = 50
	// 10px of padding top and bottom so text doesn't look squished
	VerticalPadding = 20
)

type Class struct {
	Fields  []ClassField  `json:"fields"`
	Methods []ClassMethod `json:"methods"`
}

type ClassField struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Visibility string `json:"visibility"`
}

func ( ClassField) ( int) *MText {
	return &MText{
		Text:     fmt.Sprintf("%s%s", .Name, .Type),
		FontSize: ,
		IsBold:   false,
		IsItalic: false,
		Shape:    "class",
	}
}

func ( ClassField) () string {
	switch .Visibility {
	case "protected":
		return "#"
	case "private":
		return "-"
	default:
		return "+"
	}
}

type ClassMethod struct {
	Name       string `json:"name"`
	Return     string `json:"return"`
	Visibility string `json:"visibility"`
}

func ( ClassMethod) ( int) *MText {
	return &MText{
		Text:     fmt.Sprintf("%s%s", .Name, .Return),
		FontSize: ,
		IsBold:   false,
		IsItalic: false,
		Shape:    "class",
	}
}

func ( ClassMethod) () string {
	switch .Visibility {
	case "protected":
		return "#"
	case "private":
		return "-"
	default:
		return "+"
	}
}