<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="AuctionsOptions" parent="DataStoreFrames" hidden="true">
		<Size x="615" y="306" />
		<KeyValues>
			<KeyValue key="module" value="DataStore_Auctions" />
		</KeyValues>
		<Frames>
			<Slider name="DataStoreAuctionsOptions_SliderLastVisit" inherits="OptionsSliderTemplate"  minValue="10" maxValue="30" defaultValue="15" valueStep="1">
				<Size x="180" y="16" />
				<Anchors>
					<Anchor point="TOPLEFT" x="40" y="-40" />
				</Anchors>
				<Scripts>
					<OnValueChanged>
						local L = AddonFactory:GetLocale("DataStore_Auctions")

						-- in non-retail, the options are not created yet at logon, so this test is required. Clean later.
						if DataStore_Auctions_Options then
							local name = self:GetName()
							local value = math.floor(self:GetValue())
							_G[name .. "Text"]:SetText(L["LAST_VISIT_CHECK_LABEL"] .. " (" .. value ..")");
							DataStore_Auctions_Options.CheckLastVisitThreshold = value
						end
					</OnValueChanged>
				</Scripts>
			</Slider>
			
			<CheckButton parentKey="CheckLastVisit" inherits="DataStoreToggleableOptionTemplate">
				<Anchors> 
					<Anchor point="TOPLEFT" relativeTo="DataStoreAuctionsOptions_SliderLastVisit" relativePoint="BOTTOMLEFT" x="0" y="-20" />
				</Anchors>
				<KeyValues>
					<KeyValue key="option" value="CheckLastVisit" />
					<KeyValue key="locLabel" value="LAST_VISIT_CHECK_LABEL" />
					<KeyValue key="locTitle" value="LAST_VISIT_CHECK_TITLE" />
					<KeyValue key="locEnabled" value="LAST_VISIT_CHECK_ENABLED" />
					<KeyValue key="locDisabled" value="LAST_VISIT_CHECK_DISABLED" />
				</KeyValues>
			</CheckButton>
		
			<CheckButton parentKey="AutoClearExpiredItems" inherits="DataStoreToggleableOptionTemplate">
				<Anchors> 
					<Anchor point="TOP" relativeKey="$parent.CheckLastVisit" relativePoint="BOTTOM" x="0" y="-10" />
				</Anchors>
				<KeyValues>
					<KeyValue key="option" value="AutoClearExpiredItems" />
					<KeyValue key="locLabel" value="CLEAR_EXPIRED_ITEMS_LABEL" />
					<KeyValue key="locTitle" value="CLEAR_EXPIRED_ITEMS_TITLE" />
					<KeyValue key="locEnabled" value="CLEAR_EXPIRED_ITEMS_ENABLED" />
					<KeyValue key="locDisabled" value="CLEAR_EXPIRED_ITEMS_DISABLED" />
				</KeyValues>
			</CheckButton>
		</Frames>
	</Frame>
</Ui>
