/**
 * Flex direction for each row's value container. Rendered as an inline
 * `flex-direction` style on `.pz-key-value__content`.
 */
export type PzKeyValueFlexDirection = "row" | "row-reverse" | "column" | "column-reverse";
export type PzKeyValueData = Record<string, unknown>;
export type PzKeyValuePath<TSource> = TSource extends object ? {
    [K in Extract<keyof NonNullable<TSource>, string>]: NonNullable<TSource>[K] extends Date | ((...args: never[]) => unknown) | readonly unknown[] ? K : NonNullable<TSource>[K] extends object ? K | `${K}-${PzKeyValuePath<NonNullable<TSource>[K]>}` : K;
}[Extract<keyof NonNullable<TSource>, string>] : never;
export type PzKeyValuePathValue<TSource, TPath extends string> = string extends TPath ? unknown : TPath extends `${infer Head}-${infer Tail}` ? Head extends keyof NonNullable<TSource> ? PzKeyValuePathValue<NonNullable<TSource>[Head], Tail> : unknown : TPath extends keyof NonNullable<TSource> ? NonNullable<TSource>[TPath] : unknown;
/**
 * Descriptor for a single row in the key-value list.
 *
 * @property id           Unique row id used as the Vue `:key`.
 * @property key          Source path used to read the value from `PzKeyValueProps.data`.
 *                        Nested lookups use dash-separated segments: `"customer-name"`
 *                        resolves to `data.customer.name` via lodash `get`. The same
 *                        value is also the slot name for per-row value overrides;
 *                        use `<key>_label` for the label slot.
 * @property labelKey     Default label text rendered inside the row title.
 * @property labelStyleClass Optional extra class applied to this row's title element.
 */
export interface PzKeyValueViewListItem<TKey extends string = string> {
    id: string;
    key: TKey;
    labelKey: string;
    labelStyleClass?: string;
}
export interface PzKeyValueValueSlotProps<TData extends object = PzKeyValueData, TKey extends string = string> {
    data: PzKeyValuePathValue<TData, TKey>;
    source: TData;
    item: PzKeyValueViewListItem<TKey>;
}
export type PzKeyValueSlotProps<TData extends object = PzKeyValueData, TKey extends string = string> = PzKeyValueValueSlotProps<TData, TKey>;
export interface PzKeyValueLabelSlotProps<TData extends object = PzKeyValueData, TKey extends string = string> {
    data: string;
    source: TData;
    item: PzKeyValueViewListItem<TKey>;
}
export type PzKeyValueSlotKey<TData extends object = PzKeyValueData, TKey extends string = string> = PzKeyValuePath<TData> | (string extends TKey ? never : TKey);
export type PzKeyValueSlots<TData extends object = PzKeyValueData, TKey extends string = string> = {
    [K in PzKeyValueSlotKey<TData, TKey>]?: (props: PzKeyValueValueSlotProps<TData, K>) => unknown;
} & {
    [K in `${PzKeyValueSlotKey<TData, TKey>}_label`]?: (props: PzKeyValueLabelSlotProps<TData, K extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown;
} & {
    [name: string]: ((props: PzKeyValueValueSlotProps<TData>) => unknown) | undefined;
};
/**
 * Props for the `PzKeyValue` component.
 *
 * @property config          Ordered list of row descriptors.
 * @property data            Source object. Each row's value is resolved by splitting
 *                           `PzKeyValueViewListItem.key` on `-` and calling lodash `get`.
 *                           Falsy top-level entries are filtered out before lookup.
 * @property checkRequired   When `true` (default), rows whose resolved value is empty
 *                           (null, undefined, empty string, empty array/object) are
 *                           hidden. Numbers and booleans are always treated as
 *                           non-empty, so `0` and `false` stay visible.
 * @property flexDirection   Applied as inline `flex-direction` on each row's value
 *                           container. Defaults to `"column"`.
 * @property titleStyleClass Additional class applied to every row title element.
 */
export interface PzKeyValueProps<TData extends object = PzKeyValueData, TKey extends string = string> {
    config: ReadonlyArray<PzKeyValueViewListItem<TKey>>;
    data: TData;
    checkRequired?: boolean;
    flexDirection?: PzKeyValueFlexDirection;
    titleStyleClass?: string;
}
