-- Compiled with roblox-ts v3.0.0 local TS = _G[script] local _core = TS.import(script, TS.getModule(script, "@lattice-ui", "core").out) local React = _core.React local Slot = _core.Slot local mergeGuiProps = TS.import(script, script.Parent.Parent, "sx", "mergeGuiProps").mergeGuiProps local resolveSx = TS.import(script, script.Parent.Parent, "sx", "sx").resolveSx local useTheme = TS.import(script, script.Parent.Parent, "theme", "ThemeProvider").useTheme local function Box(props) local asChild = props.asChild local sx = props.sx local children = props.children local restProps = {} for rawKey, value in pairs(props) do if not (type(rawKey) == "string") then continue end if rawKey == "asChild" or rawKey == "sx" or rawKey == "children" then continue end restProps[rawKey] = value end local _binding = useTheme() local theme = _binding.theme local mergedProps = mergeGuiProps(restProps, resolveSx(sx, theme)) if asChild then if not React.isValidElement(children) then error("[Box] `asChild` requires a single child element.") end local _attributes = table.clone(mergedProps) setmetatable(_attributes, nil) return React.createElement(Slot, _attributes, children) end return React.createElement("frame", mergedProps, children) end return { Box = Box, }