/**
 * 缓动曲线事实源（timing-function）
 * 两层：循环 infinite · 过渡 one-shot / CSS transition
 */

export const MOTION_EASING_LOOP = 'ease-in-out';
export const MOTION_EASING_TRANSITION = 'cubic-bezier(0.4, 0, 0.2, 1)';

/** Token 页展示顺序 */
export const TOKEN_MOTION_EASING = [
  {
    tokenKey: 'motion-loop-easing',
    cssVar: '--motion-loop-easing',
    label: '循环缓动',
    layer: 'loop',
    value: MOTION_EASING_LOOP,
    hint: 'infinite 动画；配合 --motion-*-loop 或固定语义变量',
    preview: 'easing',
  },
  {
    tokenKey: 'motion-transition-easing',
    cssVar: '--motion-transition-easing',
    label: '过渡缓动',
    layer: 'transition',
    value: MOTION_EASING_TRANSITION,
    hint: '内部实现；已编入 --motion-ui-*，AI 勿单独选用',
    preview: 'easing',
  },
];

/** @theme 缓动变量行 */
export function buildMotionEasingCssVarLines({ indent = '  ' } = {}) {
  return [
    `${indent}/* ── 缓动曲线（循环 / 过渡）── */`,
    `${indent}--motion-loop-easing: ${MOTION_EASING_LOOP};`,
    `${indent}--motion-transition-easing: ${MOTION_EASING_TRANSITION};`,
  ];
}
