{"version":3,"file":"ConfirmationMessage.jsx","sourceRoot":"","sources":["../../../../../src/extensions/surveys/components/ConfirmationMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAC/G,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,UAAU,mBAAmB,CAAC,EAgBnC;QAfG,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,gBAAgB,sBAAA,EAChB,UAAU,gBAAA,EACV,OAAO,aAAA,EACP,cAAc,oBAAA;IAUd,IAAM,SAAS,GAAG,uBAAuB,CAAC,UAAU,CAAC,eAAe,IAAI,uBAAuB,CAAC,eAAe,CAAC,CAAA;IAEhH,OAAO,CACH,EACI;YAAA,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,cAAM,cAAc,EAAG,CAC5D;gBAAA,CAAC,GAAG,CAAC,SAAS,CAAC,6BAA6B,CACxC;oBAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,cAAM,OAAA,OAAO,EAAE,EAAT,CAAS,CAAC,EACjC;oBAAA,CAAC,EAAE,CAAC,SAAS,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CACjE;wBAAA,CAAC,MAAM,CACX;oBAAA,EAAE,EAAE,CACJ;oBAAA,CAAC,WAAW;YACR,0BAA0B,CAAC;gBACvB,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;gBAC5D,QAAQ,EAAE,WAAW;gBACrB,YAAY,EAAE,CAAC,gBAAgB,IAAI,WAAW,KAAK,MAAM;gBACzD,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;aAC9B,CAAC,CACN;oBAAA,CAAC,aAAa,CACV,IAAI,CAAC,CAAC,OAAO,CAAC,CACd,cAAc,CAAC,CAAC,KAAK,CAAC,CACtB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,cAAM,OAAA,OAAO,EAAE,EAAT,CAAS,CAAC,EAElC;gBAAA,EAAE,GAAG,CACT;YAAA,EAAE,GAAG,CACT;QAAA,GAAG,CACN,CAAA;AACL,CAAC","sourcesContent":["import { BottomSection } from './BottomSection'\nimport { Cancel } from './QuestionHeader'\nimport { SurveyAppearance, SurveyQuestionDescriptionContentType } from '../../../posthog-surveys-types'\nimport { defaultSurveyAppearance, getContrastingTextColor, renderChildrenAsTextOrHtml } from '../surveys-utils'\nimport { h } from 'preact'\n\nexport function ConfirmationMessage({\n    header,\n    description,\n    contentType,\n    forceDisableHtml,\n    appearance,\n    onClose,\n    styleOverrides,\n}: {\n    header: string\n    description: string\n    forceDisableHtml: boolean\n    contentType?: SurveyQuestionDescriptionContentType\n    appearance: SurveyAppearance\n    onClose: () => void\n    styleOverrides?: React.CSSProperties\n}) {\n    const textColor = getContrastingTextColor(appearance.backgroundColor || defaultSurveyAppearance.backgroundColor)\n\n    return (\n        <>\n            <div className=\"thank-you-message\" style={{ ...styleOverrides }}>\n                <div className=\"thank-you-message-container\">\n                    <Cancel onClick={() => onClose()} />\n                    <h3 className=\"thank-you-message-header\" style={{ color: textColor }}>\n                        {header}\n                    </h3>\n                    {description &&\n                        renderChildrenAsTextOrHtml({\n                            component: h('div', { className: 'thank-you-message-body' }),\n                            children: description,\n                            renderAsHtml: !forceDisableHtml && contentType !== 'text',\n                            style: { color: textColor },\n                        })}\n                    <BottomSection\n                        text={'Close'}\n                        submitDisabled={false}\n                        appearance={appearance}\n                        onSubmit={() => onClose()}\n                    />\n                </div>\n            </div>\n        </>\n    )\n}\n"]}