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,SACLT,UAAU,kBACVU,QAASZ,KAAKF,WACde,gBAAgB,YAA0B,OAAfR,I,gBAE1BS,OAAI,CAACC,wBAAyB,CAAEC,OAAQhB,KAAKR,MAAMc,S,gBACnDC,MAAG,CAACL,UAAU,0B,gBACVlB,EAAAA,EAAS,CAACiC,UAAU,W,gBAG5BlC,EAAAA,EAAsB,CAACmC,QAASlB,KAAKP,MAAMC,M,gBACvCa,MAAG,CAACL,UAAU,qB,gBACVK,MAAG,CACAE,GAAK,YAA0B,OAAfJ,GAChBc,kBAAkB,mBAAiC,OAAfd,GACpCH,UAAU,2BACVa,wBAAyB,CAAEC,OAAQhB,KAAKR,MAAM4B,mB,mBA3C1E,CAA2BC,EAAAA,W,0qBCwB3B,EA3BA,SAAQ,I,mpBAAFC,EACU9B,G,wHACFA,G,gBAGVP,IAAAA,S,MAAAA,WACI,IAAMsC,EAAUvB,KAAKR,MAAMgC,KAE3B,OAAM,gBACDjB,MAAG,CAACL,UAAU,e,gBACVK,MAAG,CAACL,UAAU,e,gBACVK,MAAG,CAACL,UAAU,mBACVF,KAAKR,MAAMiC,cAAY,gBACnBlB,MAAG,CACAL,UAAU,4BACVa,wBAAyB,CAAEC,OAAQhB,KAAKR,MAAMiC,gBAGrDF,EAAQG,KAAI,SAACC,EAAMC,GAChB,OAAM,gBAAErC,EAAY,CAACsC,IAAKD,EAAOtB,MAAOqB,EAAKG,SAAUV,QAASO,EAAKI,oB,mBAnBjG,CAAuBV,EAAAA,W,gNCAvB,IAEA,EAFqB7B,SAAAA,GAAS,OAAM,gBAAL8B,EAAQ,KAAK9B","sources":["webpack://gyldendal-uddannelse/./src/Foundation/Frontend/js/utils/string.ts","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/AnimationComponents/slide-vertical-animation.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-arrow.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Article/faqs-list-item.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Article/faqs-list.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactViews/FAQsList/faqs-list-view.js"],"sourcesContent":["export const kebabCase = (string: string) =>\r\n    string\r\n        .replace(/([a-z])([A-Z])/g, \"$1-$2\")\r\n        .replace(/[\\s_]+/g, \"-\")\r\n        .toLowerCase();\r\n","// @ts-check\r\nimport AnimateHeight from \"react-animate-height\";\r\nimport React from \"react\";\r\n\r\n/**\r\n * @component\r\n * @param {object} props\r\n * @param {boolean} props.visible visible or not\r\n * @param {number} [props.delayIn] seconds to delay animating in\r\n * @param {number} [props.delayOut] seconds to delay animating in\r\n * @param {number} [props.delay] seconds to delay animating in\r\n * @param {boolean} [props.fade] should the content fade while animating height\r\n * @param {React.ReactNode} props.children React children\r\n *\r\n */\r\nfunction SlideVerticalAnimation(props) {\r\n    const height = props.visible ? \"auto\" : 0;\r\n    const delay =\r\n        props.visible && props.delayIn\r\n            ? props.delayIn\r\n            : !props.visible && props.delayOut\r\n            ? props.delayOut\r\n            : props.delay || 0;\r\n\r\n    return (\r\n        <AnimateHeight duration={250} height={height} delay={delay} animateOpacity={props.fade}>\r\n            {props.children}\r\n        </AnimateHeight>\r\n    );\r\n}\r\n\r\nexport default SlideVerticalAnimation;\r\n","import React, { Component } from \"react\";\r\n\r\n/**\r\n * @paran (String) direction - up, down, left, right - default is right\r\n */\r\n\r\nclass IconArrow extends Component {\r\n    render() {\r\n        const renderDown = () => {\r\n            return (\r\n                <svg x=\"0px\" y=\"0px\" width=\"16.4px\" height=\"9.2px\" viewBox=\"0 0 16.4 9.2\" role=\"presentation\">\r\n                    <path d=\"M16.1,0.3L8.2,8.4L0.4,0.3\" />\r\n                </svg>\r\n            );\r\n        };\r\n        const renderUp = () => {\r\n            return (\r\n                <svg x=\"0px\" y=\"0px\" width=\"16.4px\" height=\"9.2px\" viewBox=\"0 0 16.4 9.2\" role=\"presentation\">\r\n                    <path d=\"M0.6,8.6l7.9-8.1l7.9,8.1\" />\r\n                </svg>\r\n            );\r\n        };\r\n        const renderRight = () => {\r\n            return (\r\n                <svg x=\"0px\" y=\"0px\" width=\"9.2px\" height=\"16.4px\" viewBox=\"0 0 9.2 16.4\" role=\"presentation\">\r\n                    <path d=\"M0.3,0.4l8.1,7.9l-8.1,7.9\" />\r\n                </svg>\r\n            );\r\n        };\r\n        const renderLeft = () => {\r\n            return (\r\n                <svg x=\"0px\" y=\"0px\" width=\"9.2px\" height=\"16.4px\" viewBox=\"0 0 9.2 16.4\" role=\"presentation\">\r\n                    <path d=\"M8.8,16.1L0.7,8.2l8.1-7.9\" />\r\n                </svg>\r\n            );\r\n        };\r\n\r\n        const pickArrow = () => {\r\n            const val = this.props.direction || undefined;\r\n            switch (val) {\r\n                case \"up\":\r\n                    return renderUp();\r\n                case \"down\":\r\n                    return renderDown();\r\n                case \"left\":\r\n                    return renderLeft();\r\n                case \"right\":\r\n                    return renderRight();\r\n                default:\r\n                    return renderRight();\r\n            }\r\n        };\r\n        const arrow = pickArrow();\r\n\r\n        return arrow;\r\n    }\r\n}\r\n\r\nexport default IconArrow;\r\n","import React, { Component } from \"react\";\r\nimport classNames from \"classnames\";\r\nimport SlideVerticalAnimation from \"ReactComponents/Shared/AnimationComponents/slide-vertical-animation\";\r\nimport IconArrow from \"ReactComponents/Shared/Icons/icon-arrow\";\r\nimport { kebabCase } from \"js/utils/string\";\r\n\r\nclass FaqsListItem extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n            open: global.canUseDOM && isPageEditor\r\n        };\r\n        this.toggleItem = this.toggleItem.bind(this);\r\n    }\r\n\r\n    toggleItem() {\r\n        this.setState({\r\n            open: !this.state.open\r\n        });\r\n    }\r\n\r\n    render() {\r\n        const className = classNames(\"faq-item\", {\r\n            isOpen: this.state.open\r\n        });\r\n\r\n        const kebabCaseTitle = kebabCase(this.props.title);\r\n\r\n        return (\r\n            <div className={className}>\r\n                <button\r\n                    id={`faq-item-button-${kebabCaseTitle}`}\r\n                    aria-expanded={this.state.open}\r\n                    type=\"button\"\r\n                    className=\"faq-item__title\"\r\n                    onClick={this.toggleItem}\r\n                    aria-controls={`faq-item-${kebabCaseTitle}`}\r\n                >\r\n                    <span dangerouslySetInnerHTML={{ __html: this.props.title }}></span>\r\n                    <div className=\"faq-item__title__arrow\">\r\n                        <IconArrow direction=\"down\" />\r\n                    </div>\r\n                </button>\r\n                <SlideVerticalAnimation visible={this.state.open}>\r\n                    <div className=\"faq-item__content\">\r\n                        <div\r\n                            id={`faq-item-${kebabCaseTitle}`}\r\n                            aria-labelledby={`faq-item-button-${kebabCaseTitle}`}\r\n                            className=\"faq-item__content__inner\"\r\n                            dangerouslySetInnerHTML={{ __html: this.props.content }}\r\n                        ></div>\r\n                    </div>\r\n                </SlideVerticalAnimation>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default FaqsListItem;\r\n","import React, { Component } from \"react\";\r\nimport FaqsListItem from \"./faqs-list-item\";\r\n\r\nclass FAQsList extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n    }\r\n\r\n    render() {\r\n        const faqList = this.props.FAQs; //[{ question: \"Første sprøgsmål\", answer: \"lorem svar på første spgmmaslkfj\"}, { question: \"Andet sprøgsmål\", answer: \"lorem svar på andet spgmmaslkfj\"}, { question: \"Tredje sprøgsmål\", answer: \"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad cumque earum, et excepturi facilis in, ipsam itaque modi quae qui similique, voluptatum? Aliquam animi assumenda dignissimos dolor dolorum ipsam saepe.\"}];\r\n\r\n        return (\r\n            <div className=\"faq-section\">\r\n                <div className=\"content-row\">\r\n                    <div className=\"article-content\">\r\n                        {this.props.FAQListTitle && (\r\n                            <div\r\n                                className=\"featured-article__trumpet\"\r\n                                dangerouslySetInnerHTML={{ __html: this.props.FAQListTitle }}\r\n                            ></div>\r\n                        )}\r\n                        {faqList.map((item, index) => {\r\n                            return <FaqsListItem key={index} title={item.Question} content={item.Answer} />;\r\n                        })}\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        );\r\n    }\r\n}\r\nexport default FAQsList;\r\n","import * as React from \"react\";\r\nimport FAQsList from \"@/ReactComponents/Article/faqs-list\";\r\n\r\nconst FAQsListView = props => <FAQsList {...props} />;\r\n\r\nexport default FAQsListView;\r\n"],"names":["kebabCase","string","replace","toLowerCase","SlideVerticalAnimation","IconArrow","render","width","height","viewBox","role","d","FaqsListItem","props","state","open","global","canUseDOM","isPageEditor","toggleItem","bind","this","setState","className","classNames","isOpen","kebabCaseTitle","title","div","button","id","aria-expanded","type","onClick","aria-controls","span","dangerouslySetInnerHTML","__html","direction","visible","aria-labelledby","content","Component","FAQsList","faqList","FAQs","FAQListTitle","map","item","index","key","Question","Answer"],"sourceRoot":""}