<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
	<Script file="Options.lua"></Script>

	<Frame parentKey="GarrisonsOptions" parent="DataStoreFrames" hidden="true">
		<Size x="615" y="306" />
		<KeyValues>
			<KeyValue key="module" value="DataStore_Garrisons" />
		</KeyValues>
		<Frames>
			<CheckButton parentKey="ReportUncollected" inherits="DataStoreToggleableOptionTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" x="40" y="-40" />
				</Anchors>
				<KeyValues>
					<KeyValue key="option" value="ReportUncollected" />
					<KeyValue key="locLabel" value="REPORT_UNCOLLECTED_LABEL" />
					<KeyValue key="locTitle" value="REPORT_UNCOLLECTED_TITLE" />
					<KeyValue key="locEnabled" value="REPORT_UNCOLLECTED_ENABLED" />
					<KeyValue key="locDisabled" value="REPORT_UNCOLLECTED_DISABLED" />
				</KeyValues>
			</CheckButton>
			
			<Slider name="DataStoreGarrisonsOptions_SliderReportLevel" inherits="OptionsSliderTemplate"  minValue="350" maxValue="475" defaultValue="400" valueStep="5">
				<Size x="180" y="16" />
				<Anchors> 
					<Anchor point="TOPLEFT" relativeKey="$parent.ReportUncollected" relativePoint="BOTTOMLEFT" x="0" y="-20" />
				</Anchors>
				<Scripts>
					<OnValueChanged>
						local L = LibStub("AceLocale-3.0"):GetLocale("DataStore_Garrisons")
						
						local name = self:GetName()
						local value = math.floor(self:GetValue())
						_G[name .. "Text"]:SetText(format(L["REPORT_LEVEL_LABEL"], "|cFF00FF00", value))
						DataStore:SetOption("DataStore_Garrisons", "ReportLevel", value)
					</OnValueChanged>
				</Scripts>
			</Slider>
		</Frames>
	</Frame>
</Ui>
