<Ui>
	<Button name="$parentIconEventOnCondition" parentKey="IconEventOnCondition" parent="TellMeWhen_IconEditorEventsEventSettingsContainer" inherits="TellMeWhen_ButtonTemplate">
		<Size x="200" y="16"/>
		<Anchors>
			<Anchor point="TOP" relativeTo="$parentOnlyShown" relativePoint="BOTTOM" y="-7"/>
			<Anchor point="LEFT" />
			<Anchor point="RIGHT" />
		</Anchors>
		<Scripts>
			<OnLoad>
				self:SetScale(0.9)
				self:SetFrameLevel(self:GetParent():GetFrameLevel()+2)
				self.Background:SetAlpha(0.7)
				
				TMW:TT(self, "EVENTCONDITIONS", "EVENTCONDITIONS_DESC")
				
				TMW:RegisterCallback("TMW_CONFIG_EVENTS_SETTINGS_SETUP_PRE", function()
					self:Hide()
				end)
			</OnLoad>
			<OnUpdate>
				local text = TMW.CNDT:GetTabText("IconEventOnCondition")
				
				self:SetText(text)
				self:SetWidth(self:GetTextWidth()+20)
			</OnUpdate>
			<OnClick>
				TMW.CNDT:LoadConfig("IconEventOnCondition")
			</OnClick>
			<OnShow>
				self:SetHeight(16)
				if self:GetParent().AdjustHeight then
					self:GetParent():AdjustHeight()
				end
			</OnShow>
			<OnHide>
				self:SetHeight(-7)
				if self:GetParent().AdjustHeight then
					self:GetParent():AdjustHeight()
				end
			</OnHide>
		</Scripts>
	</Button>
</Ui>