<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="MessageBox.lua"></Script>
	
	<Frame name="AddonFactory_MessageBoxTemplate" inherits="BackdropTemplate" toplevel="true" parent="UIParent" hidden="true" virtual="true">
		<Size x="323" y="120" />
		<Anchors>
			<Anchor point="CENTER" x="0" y="-10" />
		</Anchors>
		<Layers>
			<Layer>
				<FontString parentKey="Text" inherits="GameFontNormal">
					<Size x="300" y="28" />
					<Anchors>
						<Anchor point="TOP" x="10" y="-20" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<KeyValues>
			<KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global"/>
		</KeyValues>
		<Frames>
			<EditBox parentKey="UserInput" inherits="InputBoxTemplate">
				<Size x="260" y="16" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Text" relativePoint="BOTTOMLEFT" x="10" y="-5" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetAutoFocus(true)
					</OnLoad>
					<OnEnterPressed>
						self:ClearFocus()
						self:SetFocus()
						self:GetParent():Button_OnClick(1)
					</OnEnterPressed>
					<OnEscapePressed>
						if self:GetText() == "" then
							self:GetParent():Button_OnClick(2)
						else
							self:SetText("")
						end
					</OnEscapePressed>
				</Scripts>
			</EditBox>
			<Button parentKey="Button1" inherits="UIPanelButtonTemplate">
				<Size x="109" y="24" />
				<Anchors>
					<!-- <Anchor point="TOPLEFT" relativeKey="$parent.UserInput" relativePoint="BOTTOMLEFT" x="25" y="-10" /> -->
					<Anchor point="BOTTOMLEFT" x="50" y="18" />
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Button_OnClick(1)
					</OnClick>
				</Scripts>
			</Button>
			<Button parentKey="Button2" inherits="UIPanelButtonTemplate">
				<Size x="109" y="24" />
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.Button1" relativePoint="RIGHT" x="2" y="0" />
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Button_OnClick(2)
					</OnClick>
				</Scripts>
			</Button>
			<Frame>
				<Scripts>
					<OnLoad inherit="prepend">
						LibStub("LibMVC-1.0"):BindViewToController(self:GetParent(), "AddonFactory.MessageBox")
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>		
	</Frame>
</Ui>
