{"version":3,"file":"EmptyState.cjs","names":["_styled","_interopRequireDefault","require","_react","_Box","_OdysseyDesignTokensContext","_Typography","_jsxRuntime","e","__esModule","default","EmptyContainer","styled","shouldForwardProp","prop","odysseyDesignTokens","display","flexDirection","marginBlock","Spacing9","padding","Spacing5","textAlign","width","alignItems","TextContainer","maxWidth","TypographyLineLengthMax","EmptyState","heading","description","PrimaryCallToActionComponent","SecondaryCallToActionComponent","useOdysseyDesignTokens","jsxs","children","jsx","Heading4","Paragraph","Box","sx","marginBlockStart","MemoizedEmptyState","exports","DataTableEmptyState","memo","displayName"],"sources":["../../src/EmptyState.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, ReactNode } from \"react\";\n\nimport { Box } from \"./Box.js\";\nimport {\n  DesignTokens,\n  useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Heading4, Paragraph } from \"./Typography.js\";\n\nconst EmptyContainer = styled(\"div\", {\n  shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n  display: \"flex\",\n  flexDirection: \"column\",\n  marginBlock: odysseyDesignTokens.Spacing9,\n  padding: odysseyDesignTokens.Spacing5,\n  textAlign: \"center\",\n  width: \"100%\",\n  alignItems: \"center\",\n}));\n\nconst TextContainer = styled(\"div\", {\n  shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n  maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n}));\n\nexport type EmptyStateProps = {\n  /**\n   * A descriptive text explaining more context as to why we don't have data.\n   */\n  description: string;\n  /**\n   * Main heading of the empty state\n   */\n  heading: string;\n  /**\n   * Primary call to action\n   */\n  PrimaryCallToActionComponent?: ReactNode;\n  /**\n   * Secondary call to action\n   */\n  SecondaryCallToActionComponent?: ReactNode;\n};\n\n/**\n * A full-width placeholder displayed when a list, table, or page section has no data to show. Communicates the empty state with a heading, description, and optional call-to-action buttons.\n */\nconst EmptyState = ({\n  heading,\n  description,\n  PrimaryCallToActionComponent,\n  SecondaryCallToActionComponent,\n}: EmptyStateProps) => {\n  const odysseyDesignTokens = useOdysseyDesignTokens();\n\n  return (\n    <EmptyContainer odysseyDesignTokens={odysseyDesignTokens}>\n      <TextContainer odysseyDesignTokens={odysseyDesignTokens}>\n        <Heading4>{heading}</Heading4>\n        <Paragraph>{description}</Paragraph>\n      </TextContainer>\n      {(PrimaryCallToActionComponent || SecondaryCallToActionComponent) && (\n        <Box sx={{ marginBlockStart: 5 }}>\n          {SecondaryCallToActionComponent}\n          {PrimaryCallToActionComponent}\n        </Box>\n      )}\n    </EmptyContainer>\n  );\n};\n\nconst MemoizedEmptyState = memo(EmptyState);\nMemoizedEmptyState.displayName = \"EmptyState\";\n\nexport { MemoizedEmptyState as EmptyState };\nexport { MemoizedEmptyState as DataTableEmptyState };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAIA,IAAAI,WAAA,GAAAJ,OAAA;AAAsD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAp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