local z=Cheer.CreateComponent("\066\084\069\120\112\111\114\116\068\105\097\108\111\103",View)function z.Start()View.Visible=true View.Loading.Size=UDim2.new(1,0,0,0)View.Loading:TweenSize(UDim2.new(1,0,0,80),nil,nil,.25)Cheer.Bind(View.Close.Button,z.Close)Cheer.Bind(View.Loading.CloseButton,z.Close)return z end function z.Close()View:Destroy()end function z.SetError(z)View.Loading.TextLabel.Text=z end function z.SetResult(z)View.Loading.Visible=false View.Info.CreationID.Text=z View.Info.Size=UDim2.new(1,0,0,0)View.Info.Visible=true View.Info:TweenSize(UDim2.new(1,0,0,75),nil,nil,.25)View.Tip.Size=UDim2.new(1,0,0,0)View.Tip.Visible=true View.Tip:TweenSize(UDim2.new(1,0,0,30),nil,nil,.25)View.Close.Size=UDim2.new(1,0,0,0)View.Close.Visible=true View.Close:TweenSize(UDim2.new(1,0,0,20),nil,nil,.25)end return z
-- Create component
local Component = Cheer.CreateComponent("BTExportDialog", View)

function Component.Start()
	-- Show the view
	View.Visible = true

	-- Animate opening
	View.Loading.Size = UDim2.new(1, 0, 0, 0)
	View.Loading:TweenSize(UDim2.new(1, 0, 0, 80), nil, nil, 0.25)

	-- Enable close buttons
	Cheer.Bind(View.Close.Button, Component.Close)
	Cheer.Bind(View.Loading.CloseButton, Component.Close)

	-- Return component for chaining
	return Component
end

function Component.Close()
	-- Closes the dialog

	-- Destroy the view
	View:Destroy()
end

function Component.SetError(Error)
	-- Sets the dialog error

	-- Set error text
	View.Loading.TextLabel.Text = Error
end

function Component.SetResult(Result)
	-- Sets the dialog result

	-- Hide loading message
	View.Loading.Visible = false

	-- Set result text
	View.Info.CreationID.Text = Result

	-- Animate opening for result UI
	View.Info.Size = UDim2.new(1, 0, 0, 0)
	View.Info.Visible = true
	View.Info:TweenSize(UDim2.new(1, 0, 0, 75), nil, nil, 0.25)
	View.Tip.Size = UDim2.new(1, 0, 0, 0)
	View.Tip.Visible = true
	View.Tip:TweenSize(UDim2.new(1, 0, 0, 30), nil, nil, 0.25)
	View.Close.Size = UDim2.new(1, 0, 0, 0)
	View.Close.Visible = true
	View.Close:TweenSize(UDim2.new(1, 0, 0, 20), nil, nil, 0.25)
end

return Component
