-- Compiled with roblox-ts v3.0.0 local function spaceTokenValue(theme, value) repeat if value == 0 then return theme.space[0] end if value == 2 then return theme.space[2] end if value == 4 then return theme.space[4] end if value == 6 then return theme.space[6] end if value == 8 then return theme.space[8] end if value == 10 then return theme.space[10] end if value == 12 then return theme.space[12] end if value == 14 then return theme.space[14] end if value == 16 then return theme.space[16] end if value == 20 then return theme.space[20] end if value == 24 then return theme.space[24] end if value == 32 then return theme.space[32] end return nil until true end local function clampSpace(value) return math.max(0, value) end local function resolveSpace(theme, value) if value == nil then return 0 end local tokenValue = spaceTokenValue(theme, value) if tokenValue ~= nil then return clampSpace(tokenValue) end return clampSpace(value) end local function resolvePadding(theme, value) local base = resolveSpace(theme, value.padding) local top = base local right = base local bottom = base local left = base if value.paddingX ~= nil then local axis = resolveSpace(theme, value.paddingX) left = axis right = axis end if value.paddingY ~= nil then local axis = resolveSpace(theme, value.paddingY) top = axis bottom = axis end if value.paddingTop ~= nil then top = resolveSpace(theme, value.paddingTop) end if value.paddingRight ~= nil then right = resolveSpace(theme, value.paddingRight) end if value.paddingBottom ~= nil then bottom = resolveSpace(theme, value.paddingBottom) end if value.paddingLeft ~= nil then left = resolveSpace(theme, value.paddingLeft) end return { top = top, right = right, bottom = bottom, left = left, } end return { resolveSpace = resolveSpace, resolvePadding = resolvePadding, }