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 { createTheme, ThemeProvider, Typography } from '@signatu/styles';
import { Consent } from '@signatu/consent';
import React from 'react';
import Highlight from 'react-highlight';
import { ConsentButtons } from '../components/consentButtons';
import { consentContent, DemoCard } from './common';
var customTheme = {
    palette: {
        backgroundColor: "#eee",
        balanced: {
            main: "orange"
        },
        attention: {
            main: "red"
        }
    }
};
var ButtonDemo = /** @class */ (function (_super) {
    __extends(ButtonDemo, _super);
    function ButtonDemo() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.name = "Buttons";
        _this.doc = React.createElement(Highlight, { className: 'hljs' }, "\nimport {Popup, TrackerConsent} from '@signatu/consent-react';\n\nconst config = {\n    apiKey: \"YOUR_API_KEY\", \n    accessToken: \"YOUR_ACCESS_TOKEN\"\n}\n\nrender() {\n    return <ConsentButtons\n        id=\"buttons_consent\"\n        config={config} \n        subject={Consent.anonUserId()}\n        issuer=\"signatu.com\"\n        target=\"signatu.com/demo/buttons\"\n        language=\"en\">\n            <div>I consent that ACME Inc. can send me weekly personalized emails for the purpose of offering me relevant products and services.</div>\n    </ConsentButtons> \n}\n");
        _this.state = {};
        return _this;
    }
    ButtonDemo.prototype.render = function () {
        var demo = React.createElement("div", null,
            React.createElement(Typography, { variant: "subtitle" }, "Standard button labels (supports multiple languages)"),
            React.createElement(ConsentButtons, { id: "buttons_consent", config: this.props.config, subject: Consent.anonUserId(), issuer: "signatu.com", target: "signatu.com/demo/checkboxandbuttons", language: this.props.language },
                React.createElement("div", { className: "dataprocessing" }, consentContent[this.props.language])),
            React.createElement(Typography, { onClick: function () { }, variant: "subtitle" }, "Custom button labels"),
            React.createElement(ConsentButtons, { id: "buttons_consent", config: this.props.config, subject: Consent.anonUserId(), issuer: "signatu.com", target: "signatu.com/demo/customtexts", acceptText: "Yes please!", refuseText: "No way!", language: this.props.language },
                React.createElement("div", { className: "dataprocessing" }, consentContent[this.props.language])),
            React.createElement(Typography, { onClick: function () { }, variant: "subtitle" }, "Strong font"),
            React.createElement(ThemeProvider, { theme: createTheme({ typography: { fontWeight: 600 } }) },
                React.createElement(ConsentButtons, { id: "buttons_consent", config: this.props.config, subject: Consent.anonUserId(), issuer: "signatu.com", target: "signatu.com/demo/customtexts", acceptText: "Yes please!", refuseText: "No way!", language: this.props.language },
                    React.createElement("div", { className: "dataprocessing" }, consentContent[this.props.language]))),
            React.createElement(Typography, { onClick: function () { }, variant: "subtitle" }, "Custom colors"),
            React.createElement(ThemeProvider, { theme: createTheme(customTheme) },
                React.createElement(ConsentButtons, { id: "buttons_consent", config: this.props.config, subject: Consent.anonUserId(), issuer: "signatu.com", target: "signatu.com/demo/customcolors", language: this.props.language },
                    React.createElement("div", { className: "dataprocessing" }, consentContent[this.props.language]))));
        return React.createElement(DemoCard, { element: demo, doc: this.doc });
    };
    return ButtonDemo;
}(React.Component));
export { ButtonDemo };
//# sourceMappingURL=button.js.map