{"version":3,"file":"BreadcrumbsItem.mjs","sources":[""],"sourcesContent":["import type { FC, ReactElement } from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { BreadcrumbsLink } from \"./BreadcrumbsLink\";\r\nimport type { IBreadcrumbsItem } from \"../config/types\";\r\nimport { BreadcrumbsContext } from \"../context\";\r\n\r\n/**\r\n * Компонент отдельного элемента хлебных крошек\r\n * @returns {ReactElement}\r\n */\r\nexport const BreadcrumbsItem: FC<IBreadcrumbsItem> = ({\r\n  isCurrent = false,\r\n  href = \"\",\r\n  labelSlot = null,\r\n  position = 1,\r\n}): ReactElement => {\r\n  const { getCN } = useContext(BreadcrumbsContext);\r\n\r\n  return (\r\n    <li\r\n      className={getCN(\"item\")}\r\n      itemProp={\"itemListElement\"}\r\n      itemScope\r\n      itemType={\"https://schema.org/ListItem\"}\r\n    >\r\n      <meta\r\n        itemProp={\"position\"}\r\n        content={String(position)}\r\n      />\r\n      <BreadcrumbsLink\r\n        isCurrent={isCurrent}\r\n        href={href}\r\n        labelSlot={labelSlot}\r\n      />\r\n    </li>\r\n  );\r\n};\r\n"],"names":["BreadcrumbsItem","isCurrent","href","labelSlot","position","getCN","useContext","BreadcrumbsContext","_jsxs","className","itemProp","itemScope","itemType","children","_jsx","content","String","BreadcrumbsLink"],"mappings":"8KAUO,MAAMA,gBAAwC,EACnDC,oBAAY,MACZC,UAAO,GACPC,oBAAY,KACZC,kBAAW,MAEX,MAAMC,MAAEA,OAAUC,WAAWC;AAE7B,OACEC,KAAA,KAAA,CACEC,UAAWJ,MAAM,QACjBK,SAAU,kBACVC,UAAS,KACTC,SAAU,8BAA8BC,SAAA,CAExCC,IAAA,OAAA,CACEJ,SAAU,WACVK,QAASC,OAAOZ,YAElBU,IAACG,gBAAe,CACdhB,UAAWA,UACXC,KAAMA,KACNC,UAAWA"}