/**
 *
 * CarouselPrev is a helper component for Carousel component.
 *
 * [Live Demo](https://www.primevue.dev/carousel/)
 *
 * @module carouselprev
 *
 */
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import type { ButtonHTMLAttributes, Component, VNode } from 'vue';

export declare type CarouselPrevPassThroughOptionType = CarouselPrevPassThroughAttributes | ((options: CarouselPrevPassThroughMethodOptions) => CarouselPrevPassThroughAttributes | string) | string | null | undefined;

/**
 * Custom passthrough(pt) option method.
 */
export interface CarouselPrevPassThroughMethodOptions {
    /**
     * Defines instance.
     */
    instance: any;
    /**
     * Defines valid properties.
     */
    props: CarouselPrevProps;
    /**
     * Defines valid attributes.
     */
    attrs: any;
    /**
     * Defines parent options.
     */
    parent: any;
    /**
     * Defines passthrough(pt) options in global config.
     */
    global: object | undefined;
}

/**
 * Custom passthrough(pt) options.
 * @see {@link CarouselPrevProps.pt}
 */
export interface CarouselPrevPassThroughOptions {
    /**
     * Used to pass attributes to the root's DOM element.
     */
    root?: CarouselPrevPassThroughOptionType;
    /**
     * Used to manage all lifecycle hooks.
     * @see {@link BaseComponent.ComponentHooks}
     */
    hooks?: ComponentHooks;
}

/**
 * Custom passthrough attributes for each DOM elements
 */
export interface CarouselPrevPassThroughAttributes {
    [key: string]: any;
}

/**
 * Defines valid properties in CarouselPrev component.
 */
export interface CarouselPrevProps {
    /**
     * Use to change the HTML tag of root element.
     * @defaultValue BUTTON
     */
    as?: string | Component | undefined;
    /**
     * When enabled, it changes the default rendered element for the one passed as a child element.
     * @defaultValue false
     */
    asChild?: boolean | undefined;
    /**
     * When present, it specifies that the element should be disabled.
     * @defaultValue false
     */
    disabled?: boolean | undefined;
    /**
     * It generates scoped CSS variables using design tokens for the component.
     */
    dt?: DesignToken<any>;
    /**
     * Used to pass attributes to DOM elements inside the component.
     * @type {CarouselPrevPassThroughOptions}
     */
    pt?: PassThrough<CarouselPrevPassThroughOptions>;
    /**
     * Used to configure passthrough(pt) options of the component.
     * @type {PassThroughOptions}
     */
    ptOptions?: PassThroughOptions;
    /**
     * When enabled, it removes component related styles in the core.
     * @defaultValue false
     */
    unstyled?: boolean;
}

/**
 * Root element attributes forwarded to the consumer when `asChild` is enabled.
 */
export interface CarouselPrevA11yAttrs extends ButtonHTMLAttributes {
    /**
     * Button type used by the default rendered element.
     */
    type?: 'button';
    /**
     * Accessible label generated from the parent carousel locale API.
     */
    'aria-label'?: string;
    /**
     * PrimeVue component identifier.
     */
    'data-pc-name': 'carouselprev';
    /**
     * PrimeVue section identifier within the component.
     */
    'data-pc-section': 'root';
    /**
     * Disabled state, true when the carousel is at the first page (and not looping) or the `disabled` prop is set.
     */
    disabled: boolean;
    /**
     * Current orientation of the parent carousel.
     */
    'data-orientation'?: 'horizontal' | 'vertical';
    /**
     * Current alignment of the parent carousel.
     */
    'data-align'?: 'start' | 'center' | 'end';
    /**
     * Current page of the parent carousel.
     */
    'data-page'?: number;
    /**
     * Mirror of the disabled attribute for CSS selector targeting.
     */
    'data-disabled': boolean;
    /**
     * Indicates whether a swipe gesture is in progress.
     */
    'data-swiping'?: '' | undefined;
    /**
     * Click handler that navigates the parent carousel to the previous page.
     */
    onClick: (event: MouseEvent) => void;
}

/**
 * Defines valid slots in CarouselPrev component.
 */
export interface CarouselPrevSlots {
    /**
     * Custom content template. Receives scope props when `asChild` is enabled.
     * @param {Object} scope - default slot's params.
     */
    default(scope: {
        /**
         * Computed class name for the prev button root.
         */
        class: string | object | Array<string | object>;
        /**
         * Attributes and click handler to spread on the consumer's root element.
         */
        a11yAttrs: CarouselPrevA11yAttrs;
        /**
         * Resolved disabled state (manual `disabled` prop OR carousel at first page without loop).
         */
        disabled: boolean;
    }): VNode[];
}

/**
 * Defines valid emits in CarouselPrev component.
 */
export interface CarouselPrevEmitsOptions {}

export declare type CarouselPrevEmits = EmitFn<CarouselPrevEmitsOptions>;

/**
 * **PrimeVue - CarouselPrev**
 *
 * _CarouselPrev is a helper component for Carousel component._
 *
 * [Live Demo](https://www.primevue.dev/carousel/)
 * --- ---
 * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
 *
 * @group Component
 *
 */
declare const CarouselPrev: DefineComponent<CarouselPrevProps, CarouselPrevSlots, CarouselPrevEmits>;

declare module 'vue' {
    export interface GlobalComponents {
        CarouselPrev: DefineComponent<CarouselPrevProps, CarouselPrevSlots, CarouselPrevEmits>;
    }
}

export default CarouselPrev;
