<commit_before>// deps-lint-skip-all
import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle, FullToken } from '../../_util/theme';
import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme';

interface BreadcrumbToken extends FullToken<'Breadcrumb'> {
  breadcrumbBaseColor: string;
  breadcrumbFontSize: number;
  breadcrumbIconFontSize: number;
  breadcrumbLinkColor: string;
  breadcrumbLinkColorHover: string;
  breadcrumbLastItemColor: string;
  breadcrumbSeparatorMargin: number;
  breadcrumbSeparatorColor: string;
}

const genBreadcrumbStyle: GenerateStyle<BreadcrumbToken, CSSObject> = token => {
  const { componentCls, iconCls } = token;

  return {
    [componentCls]: {
      ...resetComponent(token),
      color: token.breadcrumbBaseColor,
      fontSize: token.breadcrumbFontSize,

      [iconCls]: {
        fontSize: token.breadcrumbIconFontSize,
      },

      ol: {
        display: 'flex',
        flexWrap: 'wrap',
        margin: 0,
        padding: 0,
        listStyle: 'none',
      },

      a: {
        color: token.breadcrumbLinkColor,
        transition: `color ${token.motionDurationSlow}`,

        '&:hover': {
          color: token.breadcrumbLinkColorHover,
        },
      },

      'li:last-child': {
        color: token.breadcrumbLastItemColor,

        a: {
          color: token.breadcrumbLastItemColor,
        },
      },

      [`li:last-child ${componentCls}-separator`]: {
        display: 'none',
      },

      [`${componentCls}-separator`]: {
        marginInline: token.breadcrumbSeparatorMargin,
        color: token.breadcrumbSeparatorColor,
      },

      [`${componentCls}-link`]: {
        [`
        > ${iconCls} + span,
        > ${iconCls} + a
       `]: {
          marginInlineStart: token.marginXXS,
        },
      },

      [`${componentCls}-overlay-link`]: {
        [`> ${iconCls}`]: {
          marginInlineStart: token.marginXXS,
        },
      },

      // rtl style
      [`&${token.componentCls}-rtl`]: {
        direction: 'rtl',
      },
    },
  };
};

// ============================== Export ==============================
export default genComponentStyleHook('Breadcrumb', token => {
  const BreadcrumbToken = mergeToken<BreadcrumbToken>(token, {
    // FIXME: missing token
    breadcrumbBaseColor: token.colorTextSecondary,
    breadcrumbFontSize: token.fontSizeBase,
    breadcrumbIconFontSize: token.fontSizeBase,
    breadcrumbLinkColor: token.colorTextSecondary,
    breadcrumbLinkColorHover: token.colorText,
    breadcrumbLastItemColor: token.colorText,
    breadcrumbSeparatorMargin: token.paddingXS,
    breadcrumbSeparatorColor: token.colorTextSecondary,
  });

  return [genBreadcrumbStyle(BreadcrumbToken)];
});<commit_msg>chore: breadcrumb full token (#35868)<commit_after>// deps-lint-skip-all
import type { CSSObject } from '@ant-design/cssinjs';
import type { FullToken, GenerateStyle } from '../../_util/theme';
import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme';

interface BreadcrumbToken extends FullToken<'Breadcrumb'> {
  breadcrumbBaseColor: string;
  breadcrumbFontSize: number;
  breadcrumbIconFontSize: number;
  breadcrumbLinkColor: string;
  breadcrumbLinkColorHover: string;
  breadcrumbLastItemColor: string;
  breadcrumbSeparatorMargin: number;
  breadcrumbSeparatorColor: string;
}

const genBreadcrumbStyle: GenerateStyle<BreadcrumbToken, CSSObject> = token => {
  const { componentCls, iconCls } = token;

  return {
    [componentCls]: {
      ...resetComponent(token),
      color: token.breadcrumbBaseColor,
      fontSize: token.breadcrumbFontSize,

      [iconCls]: {
        fontSize: token.breadcrumbIconFontSize,
      },

      ol: {
        display: 'flex',
        flexWrap: 'wrap',
        margin: 0,
        padding: 0,
        listStyle: 'none',
      },

      a: {
        color: token.breadcrumbLinkColor,
        transition: `color ${token.motionDurationSlow}`,

        '&:hover': {
          color: token.breadcrumbLinkColorHover,
        },
      },

      'li:last-child': {
        color: token.breadcrumbLastItemColor,

        a: {
          color: token.breadcrumbLastItemColor,
        },
      },

      [`li:last-child ${componentCls}-separator`]: {
        display: 'none',
      },

      [`${componentCls}-separator`]: {
        marginInline: token.breadcrumbSeparatorMargin,
        color: token.breadcrumbSeparatorColor,
      },

      [`${componentCls}-link`]: {
        [`
        > ${iconCls} + span,
        > ${iconCls} + a
       `]: {
          marginInlineStart: token.marginXXS,
        },
      },

      [`${componentCls}-overlay-link`]: {
        [`> ${iconCls}`]: {
          marginInlineStart: token.marginXXS,
        },
      },

      // rtl style
      [`&${token.componentCls}-rtl`]: {
        direction: 'rtl',
      },
    },
  };
};

// ============================== Export ==============================
export default genComponentStyleHook('Breadcrumb', token => {
  const BreadcrumbToken = mergeToken<BreadcrumbToken>(token, {
    breadcrumbBaseColor: token.colorTextSecondary,
    breadcrumbFontSize: token.fontSizeBase,
    breadcrumbIconFontSize: token.fontSizeBase,
    breadcrumbLinkColor: token.colorTextSecondary,
    breadcrumbLinkColorHover: token.colorText,
    breadcrumbLastItemColor: token.colorText,
    breadcrumbSeparatorMargin: token.paddingXS,
    breadcrumbSeparatorColor: token.colorTextSecondary,
  });

  return [genBreadcrumbStyle(BreadcrumbToken)];
});
{'fraction_non_alphanumeric': 0.14623151821132346, 'fraction_numerical': 0.0016227912008654887, 'mean_word_length': 2.9201413427561835, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2540390', 'n_tokens_mistral': 1733, 'n_tokens_neox': 1708, 'n_words': 277}