import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { toWords, transformColumnsToSearchParams } from 'payload/shared';
import React from 'react';
import { Pill } from '../../../Pill/index.js';
import './index.scss';
const baseClass = 'query-preset-columns-cell';
export const QueryPresetsColumnsCell = ({ cellData })=>{
    return /*#__PURE__*/ _jsxDEV("div", {
        className: baseClass,
        children: cellData ? transformColumnsToSearchParams(cellData).map((column, i)=>{
            const isColumnActive = !column.startsWith('-');
            // to void very lengthy cells, only display the active columns
            if (!isColumnActive) {
                return null;
            }
            return /*#__PURE__*/ _jsxDEV(Pill, {
                pillStyle: isColumnActive ? 'always-white' : 'light',
                size: "small",
                children: toWords(column)
            }, i, false, {
                fileName: "src/elements/QueryPresets/cells/ColumnsCell/index.tsx",
                lineNumber: 24,
                columnNumber: 15
            }, this);
        }) : 'No columns selected'
    }, void 0, false, {
        fileName: "src/elements/QueryPresets/cells/ColumnsCell/index.tsx",
        lineNumber: 13,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map