import { Palette } from "Palette.slint";
import { VText } from "Text.slint";

export component VLabeledComponent {
	in property<string> label <=> labelComponent.text;
	in property<bool> enabled: true;

	VerticalLayout {
		labelComponent := VText {
			
		}

		Rectangle {
			background: enabled ? Palette.control-background : Palette.control-background.darker(0.2);
			border-radius: 4px;
			VerticalLayout {
				padding: 4px;
				@children
			}
		}
	}
}
