{"version":3,"file":"Container.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAkBnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { FooterElement } from './Footer';\nimport type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\n\n/**\n * Definition of container background colors.\n */\nexport type ContainerBackgroundColor = 'default' | 'alternative';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n * @category Component Props\n */\nexport type ContainerProps = {\n  children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n  backgroundColor?: ContainerBackgroundColor | undefined;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.backgroundColor - The color of the background.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container backgroundColor=\"default\">\n *   <Box>\n *     <Text>Hello world!</Text>\n *   </Box>\n *   <Footer>\n *     <Button name=\"cancel\">Cancel</Button>\n *     <Button name=\"confirm\">Confirm</Button>\n *   </Footer>\n * </Container>\n * @category Components\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see {@link Container}\n * @category Elements\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}