local O={}function O.fromUDim(O)local m=Instance.new("\085\073\080\097\100\100\105\110\103")m.PaddingBottom=O m.PaddingTop=O m.PaddingLeft=O m.PaddingRight=O return m end function O.getTotalPadding(O)return UDim2.new(O.PaddingLeft+O.PaddingRight,O.PaddingBottom+O.PaddingTop)end function O.getTotalAbsolutePadding(m,e)local M=O.getTotalPadding(m)return Vector2.new(M.X.Offset+M.X.Scale*e.x,M.Y.Offset+M.Y.Scale*e.Y)end function O.getHorizontalPadding(O)return O.PaddingLeft+O.PaddingRight end return O
--[=[
	Utility functions for UI padding
	@class UIPaddingUtils
]=]

local UIPaddingUtils = {}

function UIPaddingUtils.fromUDim(udim)
	local uiPadding = Instance.new("UIPadding")
	uiPadding.PaddingBottom = udim
	uiPadding.PaddingTop = udim
	uiPadding.PaddingLeft = udim
	uiPadding.PaddingRight = udim

	return uiPadding
end

function UIPaddingUtils.getTotalPadding(uiPadding)
	return UDim2.new(uiPadding.PaddingLeft + uiPadding.PaddingRight, uiPadding.PaddingBottom + uiPadding.PaddingTop)
end

function UIPaddingUtils.getTotalAbsolutePadding(uiPadding, absoluteSize)
	local padding = UIPaddingUtils.getTotalPadding(uiPadding)
	return Vector2.new(
		padding.X.Offset + padding.X.Scale * absoluteSize.x,
		padding.Y.Offset + padding.Y.Scale * absoluteSize.Y
	)
end

function UIPaddingUtils.getHorizontalPadding(uiPadding)
	return uiPadding.PaddingLeft + uiPadding.PaddingRight
end

return UIPaddingUtils
