import { Component, JSX, ParentComponent } from 'solid-js'
import type { TransRenderCallbackOrComponent, I18nContext } from "@lingui-solid/solid"
import type { MacroMessageDescriptor } from "@lingui/core/macro"
type CommonProps = TransRenderCallbackOrComponent & {
id?: string
comment?: string
context?: string
}
type TransProps = {
children: JSX.Element
} & CommonProps
type PluralChoiceProps = {
value: string | number
/** Offset of value when calculating plural forms */
offset?: number
zero?: JSX.Element
one?: JSX.Element
two?: JSX.Element
few?: JSX.Element
many?: JSX.Element
/** Catch-all option */
other: JSX.Element
/** Exact match form, corresponds to =N rule */
[digit: `_${number}`]: JSX.Element
} & CommonProps
type SelectChoiceProps = {
value: string
/** Catch-all option */
other: JSX.Element
[option: `_${string}`]: JSX.Element
} & CommonProps
/**
* Trans is the basic macro for static messages,
* messages with variables, but also for messages with inline markup
*
* @example
* ```
* Hello {username}. Read the docs.
* ```
* @example
* ```
* Hello {username}.
* ```
*/
export const Trans: ParentComponent
/**
* Props of Plural macro are transformed into plural format.
*
* @example
* ```
* import { Plural } from "@lingui/core/macro"
*
*
* // ↓ ↓ ↓ ↓ ↓ ↓
* import { Trans } from "@lingui-solid/solid"
*
* ```
*/
export const Plural: Component
/**
* Props of SelectOrdinal macro are transformed into selectOrdinal format.
*
* @example
* ```
* // count == 1 -> 1st
* // count == 2 -> 2nd
* // count == 3 -> 3rd
* // count == 4 -> 4th
*
* ```
*/
export const SelectOrdinal: Component
/**
* Props of Select macro are transformed into select format
*
* @example
* ```
* // gender == "female" -> Her book
* // gender == "male" -> His book
* // gender == "non-binary" -> Their book
*
*
* ```
*/
export const Select: Component
declare function _t(descriptor: MacroMessageDescriptor): string
declare function _t(
literals: TemplateStringsArray,
...placeholders: any[]
): string
/**
*
* Macro version of useLingui replaces _ function with `t` macro function which is bound to i18n passed from context
*
* Returned `t` macro function has all the same signatures as global `t`
*
* @example
* ```
* const { t } = useLingui();
* const message = t`Text`;
* ```
*
* @example
* ```
* const { i18n, t } = useLingui();
* const locale = i18n.locale;
* const message = t({
* id: "msg.hello",
* comment: "Greetings at the homepage",
* message: `Hello ${name}`,
* });
* ```
*/
export function useLingui(): Omit & {
t: typeof _t
}