import QtQuick
import QtQuick.Layouts
import qs.Components
import qs.Helpers
import ZShell.Config
import qs.Services

RowLayout {
	id: root

	required property var greeter
	required property real screenHeight

	spacing: Tokens.spacing.largeIncreased * 2

	ColumnLayout {
		Layout.fillWidth: true
		spacing: Tokens.spacing.medium

		CustomRect {
			Layout.fillWidth: true
			color: Colors.tPalette.m3surfaceContainer
			implicitHeight: weather.implicitHeight
			radius: Tokens.rounding.small
			topLeftRadius: Tokens.rounding.largeIncreased

			WeatherInfo {
				id: weather

				rootHeight: root.height
			}
		}

		CustomClippingRect {
			Layout.fillHeight: true
			Layout.fillWidth: true
			bottomLeftRadius: Tokens.rounding.largeIncreased
			color: Colors.tPalette.m3surfaceContainer
			radius: Tokens.rounding.small

			UserDock {
				greeter: root.greeter
			}
		}
	}

	Center {
		greeter: root.greeter
		screenHeight: root.screenHeight
	}

	ColumnLayout {
		Layout.fillWidth: true
		spacing: Tokens.spacing.medium

		CustomRect {
			Layout.fillHeight: true
			Layout.fillWidth: true
			bottomRightRadius: Tokens.rounding.largeIncreased
			color: Colors.tPalette.m3surfaceContainer
			radius: Tokens.rounding.small
			topRightRadius: Tokens.rounding.largeIncreased

			SessionDock {
				greeter: root.greeter
			}
		}
	}
}
