<commit_before>import * as React from "react"
import { useEffect, useState } from "react"
import classnames from "classnames"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"
import {
    Action,
    getTodayDate,
} from "./CookiePreferencesManager/CookiePreferencesManager"

export const CookieNotice = ({
    accepted,
    outdated,
    dispatch,
}: {
    accepted: boolean
    outdated: boolean
    dispatch: any
}) => {
    const [mounted, setMounted] = useState(false)

    useEffect(() => {
        setTimeout(() => {
            setMounted(true)
        }, 200)
    }, [])

    return (
        <div
            className={classnames("cookie-notice", "no-print", {
                open: mounted && (!accepted || outdated),
            })}
            data-test="cookie-notice"
        >
            <div className="wrapper">
                <div className="owid-row">
                    <div className="owid-col owid-col--lg-1 explanation"><commit_msg>Revert "fix(print): remove cookie notice"<commit_after>import * as React from "react"
import { useEffect, useState } from "react"
import classnames from "classnames"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"
import {
    Action,
    getTodayDate,
} from "./CookiePreferencesManager/CookiePreferencesManager"

export const CookieNotice = ({
    accepted,
    outdated,
    dispatch,
}: {
    accepted: boolean
    outdated: boolean
    dispatch: any
}) => {
    const [mounted, setMounted] = useState(false)

    useEffect(() => {
        setTimeout(() => {
            setMounted(true)
        }, 200)
    }, [])

    return (
        <div
            className={classnames("cookie-notice", {
                open: mounted && (!accepted || outdated),
            })}
            data-test="cookie-notice"
        >
            <div className="wrapper">
                <div className="owid-row">
                    <div className="owid-col owid-col--lg-1 explanation">
{'fraction_non_alphanumeric': 0.13070342205323193, 'fraction_numerical': 0.0038022813688212928, 'mean_word_length': 2.4006462035541194, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7292866', 'n_tokens_mistral': 610, 'n_tokens_neox': 589, 'n_words': 130}