local k=require(script.Parent.Basics)local H=require(script.Parent.Constants)function checkAnchorPoint(A)if A.PrePosition==nil and typeof(A.AnchorPoint)=="\115\116\114\105\110\103"then local U=H.THEME_VARIABLE.Positions[A.PrePosition]or k.Positions[A.PrePosition]or{x=0;y=0}return Vector2.new(U.x,U.y)else return nil end end function checkPosition(A)local U=A.AnchorPoint local X=H.THEME_VARIABLE.Positions[A.PrePosition]or k.Positions[A.PrePosition]or{x=0,y=0}if A.PrePosition~=nil and A.AnchorPoint==nil then U=Vector2.new(X.x,X.y)end return{Position=A.Position or UDim2.fromScale(X.x,X.y);AnchorPoint=U}end function checkSize(A,U)return H.THEME_VARIABLE[A].Sizes[U]or k[A].Sizes[U]or UDim2.fromScale(.2,.15)end return{checkPosition=checkPosition,checkSize=checkSize;checkAnchorPoint=checkAnchorPoint}
local Basics = require(script.Parent.Basics)
local Constants = require(script.Parent.Constants)

function checkAnchorPoint(props)
	if props.PrePosition == nil and typeof(props.AnchorPoint) == "string" then
		local position = Constants.THEME_VARIABLE.Positions[props.PrePosition]
			or Basics.Positions[props.PrePosition]
			or {
				x = 0,
				y = 0,
			}

		return Vector2.new(position.x, position.y)
	else
		return nil
	end
end

function checkPosition(props)
	local anchorPoint = props.AnchorPoint

	local position = Constants.THEME_VARIABLE.Positions[props.PrePosition]
		or Basics.Positions[props.PrePosition]
		or {
			x = 0,
			y = 0,
		}

	if props.PrePosition ~= nil and props.AnchorPoint == nil then
		anchorPoint = Vector2.new(position.x, position.y)
	end

	return {
		Position = props.Position or UDim2.fromScale(position.x, position.y),
		AnchorPoint = anchorPoint,
	}
end

function checkSize(component, size)
	return Constants.THEME_VARIABLE[component].Sizes[size]
		or Basics[component].Sizes[size]
		or UDim2.fromScale(0.2, 0.15)
end

return {
	checkPosition = checkPosition,
	checkSize = checkSize,
	checkAnchorPoint = checkAnchorPoint,
}
