import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import { ReactNode } from 'react';
import { AvatarProps } from '../../Avatar/types';
import { IconType } from '../../../shared/types/types';
/**
 * ============================================
 * SIDEBAR TYPES - ATOMIC DESIGN
 * ============================================
 * Definición de tipos para el componente Sidebar
 * siguiendo principios de Atomic Design y DRY
 */
/**
 * Tipo de icono compatible con el sistema de iconos
 */
export type SidebarIcon = IconType;
/**
 * Estado del badge para items del menú
 */
export interface SidebarBadge {
    /** Etiqueta del badge (número o texto) */
    label: string | number;
    /** Color del badge */
    color?: 'accent' | 'success' | 'warning' | 'danger' | 'info' | 'gray';
    /** Tema del badge */
    theme?: 'solid' | 'soft';
}
/**
 * ============================================
 * MENU ITEM PROPS
 * ============================================
 * Props para un item individual del menú
 */
export interface SidebarMenuItemProps {
    /** Identificador único del item */
    id: string;
    /** Texto a mostrar */
    label: string;
    /** Icono del item (FontAwesome) */
    icon?: SidebarIcon;
    /** Badge opcional */
    badge?: SidebarBadge;
    /** Indica si el item está activo/seleccionado */
    active?: boolean;
    /** Indica si el item está deshabilitado */
    disabled?: boolean;
    /** Indica si el item tiene submenú */
    hasSubmenu?: boolean;
    /** Handler de click */
    onClick?: (id: string) => void;
    /** Clases CSS adicionales */
    className?: string;
    /** Ruta de navegación (opcional) */
    href?: string;
}
/**
 * ============================================
 * SECTION TITLE PROPS
 * ============================================
 * Props para el título de una sección
 */
export interface SidebarSectionTitleProps {
    /** Texto del título */
    title: string;
    /** Clases CSS adicionales */
    className?: string;
}
/**
 * ============================================
 * DIVIDER PROPS
 * ============================================
 * Props para el separador
 */
export interface SidebarDividerProps {
    /** Clases CSS adicionales */
    className?: string;
    /** Muestra divider con texto */
    withText?: boolean;
    /** Texto del divider */
    text?: string;
}
/**
 * ============================================
 * MENU GROUP PROPS
 * ============================================
 * Props para un grupo de items del menú
 */
export interface SidebarMenuGroupProps {
    /** Título de la sección (opcional) */
    title?: string;
    /** Items del menú */
    items: SidebarMenuItemProps[];
    /**
     * When true with `title`, section header toggles visibility (Figma collapsible blocks).
     * When false, title uses a static divider row.
     */
    collapsible?: boolean;
    /** Initial open state when `collapsible` is true. */
    defaultExpanded?: boolean;
    /**
     * When true (narrow rail), section titles and collapsible headers are hidden; titled groups
     * show a plain divider line only, then items.
     */
    collapsed?: boolean;
    /**
     * When the group has a `title`, omit the leading **plain** `SidebarDivider` when it would
     * duplicate the rail divider below the header: collapsed rail (before items), or expanded
     * collapsible section (before the chevron header).
     */
    skipLeadingPlainDivider?: boolean;
    /** Clases CSS adicionales */
    className?: string;
}
/**
 * ============================================
 * WORKSPACE CARD PROPS
 * ============================================
 * Props para la tarjeta de workspace/proyecto
 */
export interface SidebarWorkspaceCardProps {
    /** Leading icon (Figma: pen-to-square on brand). */
    icon?: SidebarIcon;
    /**
     * Small label above the campaign row (Figma Sidebar-Menu “Mesa de trabajo”, Body XS / tertiary).
     */
    sectionLabel?: string;
    /**
     * Primary campaign/project line (Body LG / brand). If `projectId` is set, it wins for display.
     */
    title?: string;
    /** Badge with counter (Figma: brand pill on the right). */
    badge?: SidebarBadge;
    /** Preferred source for the primary line when both `title` and `projectId` are used. */
    projectId?: string;
    /**
     * When false, hides the footer text actions even if `onOpen` / `onClose` are set.
     * @defaultValue true
     */
    showActions?: boolean;
    /** Left CTA (Figma: “Cerrar”, danger text). */
    onClose?: () => void;
    /** Right CTA (Figma: “Ver pauta”). */
    onOpen?: () => void;
    /** Copy for the close action. */
    closeLabel?: string;
    /** Copy for the primary action (e.g. open schedule). */
    primaryActionLabel?: string;
    /** Border style for the card surface (Figma “Mesa de trabajo” uses dashed). */
    cardBorderStyle?: 'solid' | 'dashed';
    /** Clases CSS adicionales */
    className?: string;
}
/**
 * Workspace slot on {@link SidebarProps}: same props as the card plus optional sheet presentation.
 */
export type SidebarWorkspaceConfig = SidebarWorkspaceCardProps & {
    /**
     * When `true` (expanded sidebar), the card is not rendered under the menu scroll area.
     * A “Mesa de trabajo” trigger opens it as a sheet that slides up over the user profile rail.
     */
    workspaceSheet?: boolean;
    /** Controlled sheet visibility (requires `onWorkspaceSheetOpenChange`). */
    workspaceSheetOpen?: boolean;
    onWorkspaceSheetOpenChange?: (open: boolean) => void;
};
/**
 * ============================================
 * USER PROFILE PROPS
 * ============================================
 * Grouped props for the sidebar user rail + account popover (Figma `290:52422`).
 */
/** Summary shown on the rail and in the popover header. */
export interface SidebarUserProfileSummaryProps {
    /** Display name (rail primary line + popover header). */
    name: string;
    /** Secondary line on the rail (e.g. role). */
    subtitle?: string;
    /**
     * Secondary line in the popover header (e.g. email).
     * Falls back to `subtitle` when omitted.
     */
    email?: string;
    avatarProps?: Omit<AvatarProps, 'type'> & {
        type?: AvatarProps['type'];
        src?: string;
    };
    /** Optional presence chip in the popover header (e.g. “En linea”). */
    presence?: {
        label: string;
    };
}
/** Popover menu actions (ellipsis trigger). Omit entirely to hide the menu trigger. */
export interface SidebarUserProfileMenuProps {
    onSettings?: () => void;
    /** @defaultValue Configuración */
    settingsLabel?: string;
    darkMode?: {
        checked: boolean;
        onChange: (checked: boolean) => void;
        /** @defaultValue Dark mode */
        label?: string;
    };
    onLogout?: () => void;
    /** @defaultValue Cerrar sesión */
    logoutLabel?: string;
}
export interface SidebarUserProfileProps {
    summary: SidebarUserProfileSummaryProps;
    menu?: SidebarUserProfileMenuProps;
    /**
     * Popover anchor position relative to the menu trigger.
     * Default `top-left`: panel above the trigger, left edges aligned (extends to the right).
     * @defaultValue 'top-left'
     */
    menuPosition?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'left' | 'right' | 'bottom-right' | 'bottom-center' | 'bottom-left';
    className?: string;
}
/**
 * ============================================
 * SIDEBAR PROPS
 * ============================================
 * Props principales del componente Sidebar
 */
export interface SidebarProps {
    /** Logo del sistema (URL o componente) */
    logo?: ReactNode | string;
    /** Handler de click en logo */
    onLogoClick?: () => void;
    /**
     * Trailing header slot (e.g. notifications icon + badge). Hidden when collapsed if you omit it.
     */
    headerTrailing?: ReactNode;
    /** Workspace card (`SidebarWorkspaceCard`). Use `workspaceSheet` on the object for slide-over profile mode. */
    workspace?: SidebarWorkspaceConfig;
    /** Grupos de menú */
    menuGroups?: SidebarMenuGroupProps[];
    /** Perfil del usuario */
    userProfile?: SidebarUserProfileProps;
    /** Pie del rail (e.g. legales + versión). */
    footer?: ReactNode;
    /** Estado colapsado */
    collapsed?: boolean;
    /** Handler para toggle de collapse */
    onToggleCollapse?: () => void;
    /** Clases CSS adicionales */
    className?: string;
    /** Expanded width in px (Figma: 240). */
    width?: number;
    /** Collapsed width in px (Figma: 56). */
    collapsedWidth?: number;
    /**
     * Second-level navigation: when `active`, renders `SidebarDrilldownPanel` instead of `menuGroups`.
     * Logo, workspace (if not collapsed) and user profile behavior are unchanged.
     */
    drilldown?: SidebarDrilldownConfig;
}
/**
 * ============================================
 * SIDEBAR DRILLDOWN PANEL (second-level nav)
 * ============================================
 * App-agnostic submenu list aligned with shell drilldown patterns.
 */
/** Entry inside a drilldown parent item (no router coupling). */
export interface SidebarDrilldownSubmenuItem {
    /** Stable key for lists; index-based fallback is used when omitted. */
    id?: string;
    /** Row label. */
    title: string;
    /** Font Awesome icon, legacy icon name, or omit for a neutral dot icon. */
    icon?: IconDefinition | string;
    /** Optional href for the host app (navigation stays in `onActivateSubmenu`). */
    href?: string;
    /** Optional side effect when the row is activated. */
    onClick?: () => void;
}
/** Parent row that owns a drilldown submenu. */
export interface SidebarDrilldownParentItem {
    title: string;
    submenus?: SidebarDrilldownSubmenuItem[];
}
export interface SidebarDrilldownPanelProps {
    /**
     * When true, shows breadcrumb header and full-width rows.
     * When false, shows icon-only actions with tooltips.
     */
    expanded: boolean;
    parentItem: SidebarDrilldownParentItem;
    /** First breadcrumb segment (e.g. product area). */
    breadcrumbRootLabel: string;
    /** Returns whether a submenu row should render as active/selected. */
    isSubmenuActive?: (item: SidebarDrilldownSubmenuItem) => boolean;
    /**
     * When false, hides the root breadcrumb label and chevron before the parent title.
     */
    showBreadcrumbRoot?: boolean;
    /** Invoked after optional `onClick` on the row; host handles `href` / routing. */
    onActivateSubmenu?: (item: SidebarDrilldownSubmenuItem) => void;
    /** Navigates back to the parent menu level. */
    onBack: () => void;
    /** Accessible label for the collapsed back control tooltip. */
    backButtonTooltip?: string;
    className?: string;
}
/**
 * Drilldown mode for the Sidebar organism: same props as `SidebarDrilldownPanel` plus `active`.
 * When `active` is true, menu groups are not rendered and the panel fills the menu region.
 */
export type SidebarDrilldownConfig = {
    active: boolean;
} & SidebarDrilldownPanelProps;
//# sourceMappingURL=index.d.ts.map