var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import { Typography } from '@signatu/styles';
import { TrackerInfoList } from '@signatu/trackerdetect-react';
import React from 'react';
import Highlight from 'react-highlight';
import { CookieBanner } from '..';
import { DemoCard } from './common';
import { Consent } from '@signatu/consent';
var CookieBannerDemo = /** @class */ (function (_super) {
    __extends(CookieBannerDemo, _super);
    function CookieBannerDemo() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.name = "Cookie Banner";
        _this.doc = React.createElement(Highlight, { className: 'hljs' }, "\n\nimport {DataProcessingConsent} from '@signatu/consent-react';\n\nconst config = {\n    apiKey: \"YOUR_API_KEY\", \n    accessToken: \"YOUR_ACCESS_TOKEN\"\n}\nconst demoTrackers = ['googleanalytics', 'signatu', 'adform', 'aws']\n\n<CookieBanner \n    config={config}\n    subject={Consent.anonSubject()}\n    issuer=\"signatu.com\"\n    target=\"signatu.com/demo/cookies\"\n    scope={demoTrackers.join(' ')}\n    language={this.props.language}>\n\n    <Typography variant=\"subtitle\">We share data with following third parties: </Typography>\n\n    <TrackerInfoList\n        config={config}\n        trackerNames={demoTrackers}>\n    </TrackerInfoList>\n</CookieBanner>\n}\n\n  ");
        _this.state = {
            active: false
        };
        return _this;
    }
    CookieBannerDemo.prototype.render = function () {
        var demoTrackers = ['googleanalytics', 'signatu', 'adform', 'aws'];
        var config = this.props.config;
        var demo = React.createElement("div", null,
            React.createElement(Typography, { variant: "title" }, "Cookie Banner"),
            React.createElement("p", null, "The cookie banner accepts a list of Trackers and will dynamically build a Cookie Consent overlay. The overlay will use the theme colors and open at the bottom of the screen. "),
            React.createElement("p", null,
                " Once you choose accept or refuse, the banner does not show again for the same Subject ID. If you want trigger a new dialog, click ",
                React.createElement("strong", null, "NEW SUBJECT ID"),
                " above."),
            React.createElement(CookieBanner, { config: config, subject: Consent.anonSubject(), issuer: "signatu.com", target: "signatu.com/demo/cookies", scope: demoTrackers.join(' '), language: this.props.language },
                React.createElement(Typography, { variant: "subtitle" }, "We share data with following third parties: "),
                React.createElement(TrackerInfoList, { config: config, trackerNames: demoTrackers })));
        return React.createElement(DemoCard, { element: demo, doc: this.doc });
    };
    return CookieBannerDemo;
}(React.Component));
export { CookieBannerDemo };
//# sourceMappingURL=cookieBanner.js.map