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kB,EAAE,CAAC,EACtE;MAAA,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,EACpE;MAAA,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,EACtE;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,IAAI,GAAG;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,qBAAqB,CAAC,QAAQ,GAAG;IAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\n\nimport { ThemeOverride, icons, Sentiment } from '@pega/cosmos-react-core';\nimport type { SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n  title: 'Core/Sentiment',\n  component: Sentiment,\n  excludeStories: ['ConfigurableSentiment']\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n  positiveLabel: string;\n  neutralLabel: string;\n  negativeLabel: string;\n  positiveIcon: string;\n  neutralIcon: string;\n  negativeIcon: string;\n}\n\nexport const SentimentDemo: StoryFn<SentimentStoryProps> = (args: SentimentStoryProps) => {\n  const iconNames = {\n    positive: args.positiveIcon,\n    neutral: args.neutralIcon,\n    negative: args.negativeIcon\n  };\n\n  const labels = {\n    positive: args.positiveLabel,\n    neutral: args.neutralLabel,\n    negative: args.negativeLabel\n  };\n\n  return (\n    <Sentiment\n      variant={args.variant}\n      labelHidden={args.labelHidden}\n      icons={iconNames}\n      labels={labels}\n    />\n  );\n};\n\nSentimentDemo.args = {\n  variant: 'positive',\n  labelHidden: false,\n  positiveLabel: 'Yay!',\n  positiveIcon: 'face-happy-solid',\n  neutralLabel: 'Hm…',\n  neutralIcon: 'face-blank-solid',\n  negativeLabel: 'Uh-oh!',\n  negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n  variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n  labelHidden: { control: { type: 'boolean' } },\n  positiveLabel: { control: { type: 'text' } },\n  positiveIcon: { options: [...icons], control: { type: 'select', icons: true } },\n  neutralLabel: { control: { type: 'text' } },\n  neutralIcon: { options: [...icons], control: { type: 'select', icons: true } },\n  negativeLabel: { control: { type: 'text' } },\n  negativeIcon: { options: [...icons], control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n  positiveColor?: string;\n  negativeColor?: string;\n  neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: StoryFn<ConfigurableSentimentProps> = (\n  args: ConfigurableSentimentProps\n) => {\n  return (\n    <ThemeOverride\n      theme={{\n        components: {\n          sentiment: {\n            positive: {\n              color: args.positiveColor\n            },\n            negative: {\n              color: args.negativeColor\n            },\n            neutral: {\n              color: args.neutralColor\n            }\n          }\n        }\n      }}\n    >\n      <Sentiment variant='positive' icons={{ positive: 'face-happy-solid' }} />\n      <Sentiment variant='negative' icons={{ negative: 'face-sad-solid' }} />\n      <Sentiment variant='neutral' icons={{ neutral: 'face-blank-solid' }} />\n    </ThemeOverride>\n  );\n};\n\nConfigurableSentiment.args = {\n  positiveColor: '#20aa50',\n  negativeColor: '#d91c29',\n  neutralColor: '#939393'\n};\n\nConfigurableSentiment.argTypes = {\n  positiveColor: { control: { type: 'color' } },\n  negativeColor: { control: { type: 'color' } },\n  neutralColor: { control: { type: 'color' } }\n};\n"]}