/**
* This Source Code is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) Infonomic Company Limited
*/
/**
* The advertised-locales widget and the immediate-save confirmation explain
* what a checkbox does to public delivery. Rendered with the real English
* admin bundle, so a renamed or deleted key fails here rather than showing a
* raw key to an editor.
*/
import { act, type ReactNode } from 'react'
import { adminTranslations } from '@byline/i18n/admin'
import { I18nProvider } from '@byline/i18n/react'
import { createRoot, type Root } from 'react-dom/client'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
vi.mock('@byline/ui/react', () => {
const Modal = ({ children }: { children?: ReactNode }) =>
{children}
const Part = ({ children }: { children?: ReactNode }) =>
{children}
Modal.Container = Part
Modal.Header = Part
Modal.Content = Part
Modal.Actions = Part
return {
Label: ({ label }: { label?: string }) => {label},
HelpText: ({ text }: { text: string }) =>