-- Credits: Fluent - Dawid

local Creator = require("../../modules/Creator")
local AcrylicBlur = require("./Blur")

local New = Creator.New

return function(props)
	local AcrylicPaint = {}

  	AcrylicPaint.Frame = New("Frame", {
  		Size = UDim2.fromScale(1, 1),
  		BackgroundTransparency = 1,
  		BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  		BorderSizePixel = 0,
  	}, {
--		New("ImageLabel", {
--			Image = "rbxassetid://8992230677",
--			ScaleType = "Slice",
--			SliceCenter = Rect.new(Vector2.new(99, 99), Vector2.new(99, 99)),
--			AnchorPoint = Vector2.new(0.5, 0.5),
--			Size = UDim2.new(1, 120, 1, 116),
--			Position = UDim2.new(0.5, 0, 0.5, 0),
--			BackgroundTransparency = 1,
--			ImageColor3 = Color3.fromRGB(0, 0, 0),
--			ImageTransparency = 0.7,
--		}),

		New("UICorner", {
			CornerRadius = UDim.new(0, 8),
		}),

		New("Frame", {
			BackgroundTransparency = 1,
			Size = UDim2.fromScale(1, 1),
			Name = "Background",
			ThemeTag = {
				BackgroundColor3 = "AcrylicMain",
			},
		}, {
			New("UICorner", {
				CornerRadius = UDim.new(0, 8),
			}),
		}),

  		New("Frame", {
  			BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  			BackgroundTransparency = 1,
  			Size = UDim2.fromScale(1, 1),
  		}, {
--			New("UICorner", {
--				CornerRadius = UDim.new(0, 8),
--			}),

--			New("UIGradient", {
--				Rotation = 90,
--				ThemeTag = {
--					Color = "AcrylicGradient",
--				},
--			}),
  		}),

		New("ImageLabel", {
			Image = "rbxassetid://9968344105",
			ImageTransparency = 0.98,
			ScaleType = Enum.ScaleType.Tile,
			TileSize = UDim2.new(0, 128, 0, 128),
			Size = UDim2.fromScale(1, 1),
			BackgroundTransparency = 1,
		}, {
			New("UICorner", {
				CornerRadius = UDim.new(0, 8),
			}),
		}),

		New("ImageLabel", {
			Image = "rbxassetid://9968344227",
			ImageTransparency = 0.9,
			ScaleType = Enum.ScaleType.Tile,
			TileSize = UDim2.new(0, 128, 0, 128),
			Size = UDim2.fromScale(1, 1),
			BackgroundTransparency = 1,
			ThemeTag = {
				ImageTransparency = "AcrylicNoise",
			},
		}, {
			New("UICorner", {
				CornerRadius = UDim.new(0, 8),
			}),
		}),

  		New("Frame", {
  			BackgroundTransparency = 1,
  			Size = UDim2.fromScale(1, 1),
  			ZIndex = 2,
  		}, {
--			New("UICorner", {
--				CornerRadius = UDim.new(0, 8),
--			}),
--			New("UIStroke", {
--				Transparency = 0.5,
--				Thickness = 1,
--				ThemeTag = {
--					Color = "AcrylicBorder",
--				},
--			}),
  		}),
  	})

    
    local Blur
    
    task.wait()
	if props.UseAcrylic then
		Blur = AcrylicBlur()
		
		Blur.Frame.Parent = AcrylicPaint.Frame
		AcrylicPaint.Model = Blur.Model
		AcrylicPaint.AddParent = Blur.AddParent
		AcrylicPaint.SetVisibility = Blur.SetVisibility
	end

	return AcrylicPaint, Blur
end
