import Quickshell
import QtQuick
import ZShell.Config
import qs.Components
import qs.Services

TextEditBase {
	id: root

	color: Colors.palette.m3onSurface
	readOnly: true
	textFormat: Text.MarkdownText
	font.pointSize: Tokens.font.size.smaller
	wrapMode: Text.WrapAtWordBoundaryOrAnywhere

	onLinkActivated: link => {
		Qt.openUrlExternally(link);
	}

	CustomMouseArea {
		anchors.fill: parent
		acceptedButtons: Qt.NoButton
		cursorShape: root.hoveredLink !== "" ? Qt.PointingHandCursor : Qt.IBeamCursor
		preventStealing: false
		hoverEnabled: true
	}
}
