import type { IChipsItem } from '../../../types'; /** Конвертирует массив строк в чипсы IChipsItem; строку '#' заменяет на 'post'. */ export function convertStringArrayToChips(array: string[], prefix: string, resetPath: string): IChipsItem[] { return array.map((item) => ({ title: item.toLowerCase() === '#' ? 'post' : item, value: item.toLowerCase() === '#' ? 'post' : item, prefix: prefix, resetPath: resetPath, })); }