import openfl.Assets;
import openfl.text.Font;
import feathers.text.TextFormat;
import model.Constants;
import components.NekoRectangle;
import openfl.display.Shape;
import openfl.display.Graphics;
import feathers.layout.AnchorLayoutData;
import feathers.layout.AnchorLayout;
import feathers.controls.LayoutGroup;
import openfl.display.Sprite;
import feathers.controls.Panel;
import feathers.controls.navigators.StackNavigator;
import feathers.controls.Application;
import feathers.controls.Label;
import model.Constants;

class LPTCManager2026 extends Application {
	private var mainPanel:Panel;

	// private var nav:StackNavigator;

	public function new() {
		super();
	}

	override private function initialize():Void {
		super.initialize();

		stage.displayState = NORMAL;
		stage.scaleMode = NO_SCALE;

		mainPanel = new Panel();
		mainPanel.autoSizeMode = STAGE;
		mainPanel.backgroundSkin = new NekoRectangle(Constants.MAIN_COLOR3);

		var header = new LayoutGroup();
		header.autoSizeMode = CONTENT;
		header.backgroundSkin = new NekoRectangle(Constants.HERO_COLOR, 0, 0, stage.stageWidth, Std.int(stage.stageHeight * 8 / 100));
		header.variant = LayoutGroup.VARIANT_TOOL_BAR;
		header.layout = new AnchorLayout();

		var title = new Label();
		title.text = "Header";
		var fnt:Font = Assets.getFont(Constants.MONTSERRAT_SEMIBOLD_600);
		
		title.textFormat =  new TextFormat(fnt.fontName, 20, Constants.MAIN_COLOR3);
		title.variant = Label.VARIANT_HEADING;
		title.layoutData = AnchorLayoutData.center();
		header.addChild(title);

		mainPanel.header = header;

		var footer = new LayoutGroup();

		footer.autoSizeMode = CONTENT;
		footer.backgroundSkin = new NekoRectangle(Constants.MAIN_COLOR2, 0, 0, stage.stageWidth, Std.int(stage.stageHeight * 10 / 100));
		footer.variant = LayoutGroup.VARIANT_TOOL_BAR;
		footer.layout = new AnchorLayout();

		var title = new Label();
		title.text = "Footer";
		title.variant = Label.VARIANT_HEADING;
		title.layoutData = AnchorLayoutData.center();
		footer.addChild(title);

		mainPanel.footer = footer;

		addChild(mainPanel);

		// nav = new StackNavigator();

		trace(this, "--> initialize()");
	}
}
