/** * Copyright 2025, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type HTMLAttributes } from 'react'; import type { FLAGS } from './constants.js'; type CountryCode = (typeof FLAGS)[number]; type Dimensions = { /** * The width of the flag image. To size the flag correctly, either width or height must be provided. */ width?: never; /** * The height of the flag image. To size the flag correctly, either width or height must be provided. */ height?: number; } | { /** * The width of the flag image. To size the flag correctly, either width or height must be provided. */ width?: number; /** * The height of the flag image. To size the flag correctly, either width or height must be provided. */ height?: never; }; export type FlagProps = HTMLAttributes & { countryCode: CountryCode; /** * The alt text for the flag image. */ alt: string; /** * Additional class name to apply to the flag wrapper. */ className?: string; /** * Additional class name to apply to the flag's inner image. */ imageClassName?: string; } & Dimensions; /** * Renders an SVG icon of a flag. Flags are sourced from: https://flagicons.lipis.dev/ */ export declare const Flag: import("react").ForwardRefExoticComponent>; export {};