local e=script.Parent.Parent local F=require(e.Packages.Flipper)local w=require(e.Modules.Creator)local s=w.New local i=F.Spring.new return function(e,F,i)local u={}i=i or false u.Title=s("\084\101\120\116\076\097\098\101\108",{FontFace=Font.new("\114\098\120\097\115\115\101\116\058\047\047\102\111\110\116\115\047\102\097\109\105\108\105\101\115\047\071\111\116\104\097\109\083\083\109\046\106\115\111\110");TextColor3=Color3.fromRGB(200,200,200),TextSize=14;TextWrapped=true;TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,BackgroundColor3=Color3.fromRGB(255,255,255);AutomaticSize=Enum.AutomaticSize.Y;BackgroundTransparency=1,Size=UDim2.fromScale(1,1),ThemeTag={TextColor3="\084\101\120\116"}})u.HoverFrame=s("\070\114\097\109\101",{Size=UDim2.fromScale(1,1);BackgroundTransparency=1;ThemeTag={BackgroundColor3="\072\111\118\101\114"}},{s("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,4)})})u.Frame=s("\084\101\120\116\066\117\116\116\111\110",{Size=UDim2.new(0,0,0,32);Parent=F;ThemeTag={BackgroundColor3="\068\105\097\108\111\103\066\117\116\116\111\110"}},{s("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,4)});s("\085\073\083\116\114\111\107\101",{ApplyStrokeMode=Enum.ApplyStrokeMode.Border,Transparency=.65;ThemeTag={Color="\068\105\097\108\111\103\066\117\116\116\111\110\066\111\114\100\101\114"}});u.HoverFrame;u.Title})local S,M=w.SpringMotor(1,u.HoverFrame,"\066\097\099\107\103\114\111\117\110\100\084\114\097\110\115\112\097\114\101\110\099\121",i)w.AddSignal(u.Frame.MouseEnter,function()M(.97)end)w.AddSignal(u.Frame.MouseLeave,function()M(1)end)w.AddSignal(u.Frame.MouseButton1Down,function()M(1)end)w.AddSignal(u.Frame.MouseButton1Up,function()M(.97)end)return u end
local Root = script.Parent.Parent
local Flipper = require(Root.Packages.Flipper)
local Creator = require(Root.Modules.Creator)
local New = Creator.New

local Spring = Flipper.Spring.new

return function(Theme, Parent, DialogCheck)
	local Button = {}

	DialogCheck = DialogCheck or false

	Button.Title = New("TextLabel", {
		FontFace = Font.new("rbxasset://fonts/families/GothamSSm.json"),
		TextColor3 = Color3.fromRGB(200, 200, 200),
		TextSize = 14,
		TextWrapped = true,
		TextXAlignment = Enum.TextXAlignment.Center,
		TextYAlignment = Enum.TextYAlignment.Center,
		BackgroundColor3 = Color3.fromRGB(255, 255, 255),
		AutomaticSize = Enum.AutomaticSize.Y,
		BackgroundTransparency = 1,
		Size = UDim2.fromScale(1, 1),
		ThemeTag = {
			TextColor3 = "Text",
		},
	})

	Button.HoverFrame = New("Frame", {
		Size = UDim2.fromScale(1, 1),
		BackgroundTransparency = 1,
		ThemeTag = {
			BackgroundColor3 = "Hover",
		},
	}, {
		New("UICorner", {
			CornerRadius = UDim.new(0, 4),
		}),
	})

	Button.Frame = New("TextButton", {
		Size = UDim2.new(0, 0, 0, 32),
		Parent = Parent,
		ThemeTag = {
			BackgroundColor3 = "DialogButton",
		},
	}, {
		New("UICorner", {
			CornerRadius = UDim.new(0, 4),
		}),
		New("UIStroke", {
			ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
			Transparency = 0.65,
			ThemeTag = {
				Color = "DialogButtonBorder",
			},
		}),
		Button.HoverFrame,
		Button.Title,
	})

	local Motor, SetTransparency = Creator.SpringMotor(1, Button.HoverFrame, "BackgroundTransparency", DialogCheck)
	Creator.AddSignal(Button.Frame.MouseEnter, function()
		SetTransparency(0.97)
	end)
	Creator.AddSignal(Button.Frame.MouseLeave, function()
		SetTransparency(1)
	end)
	Creator.AddSignal(Button.Frame.MouseButton1Down, function()
		SetTransparency(1)
	end)
	Creator.AddSignal(Button.Frame.MouseButton1Up, function()
		SetTransparency(0.97)
	end)

	return Button
end
