'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import * as Accordion from '@radix-ui/react-accordion';
import { ChevronDown } from 'lucide-react';
export function SeoAccordion({ children, defaultOpen = ['focus-keyword', 'search-appearance'], }) {
    return (_jsx(Accordion.Root, { type: "multiple", defaultValue: defaultOpen, className: "divide-y divide-[var(--bdr)]", children: children }));
}
export function SeoAccordionItem({ value, title, badge, children, }) {
    return (_jsxs(Accordion.Item, { value: value, className: "border-[var(--bdr)] bg-[var(--sb)]", children: [_jsx(Accordion.Header, { children: _jsxs(Accordion.Trigger, { className: "group flex w-full items-center justify-between gap-2 px-5 py-3.5 text-left transition-colors duration-[var(--motion-fast)] hover:bg-[var(--bg)] focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:outline-none", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "text-[13px] font-medium text-[var(--txt)]", children: title }), badge] }), _jsx(ChevronDown, { size: 16, "aria-hidden": true, className: "shrink-0 text-[var(--muted)] group-data-[state=open]:rotate-180 motion-safe:transition-transform motion-safe:duration-200" })] }) }), _jsx(Accordion.Content, { className: "overflow-hidden data-[state=closed]:hidden", children: _jsx("div", { className: "space-y-3 px-5 pt-1 pb-4", children: children }) })] }));
}
export function SeoAccordionBadge({ tone, children, }) {
    const cls = tone === 'good'
        ? 'bg-[var(--suc-l)] text-[var(--suc)]'
        : tone === 'warn'
            ? 'bg-[var(--warn-l)] text-[var(--warn)]'
            : tone === 'bad'
                ? 'bg-[var(--err-l)] text-[var(--err)]'
                : 'bg-[var(--bg)] text-[var(--sub)]';
    return (_jsx("span", { className: `rounded-full px-2 py-0.5 text-[10.5px] font-medium ${cls}`, children: children }));
}
//# sourceMappingURL=SeoAccordion.js.map