import React from 'react';
import { TextView as FieldsTextView } from '@wix/patterns-fields';
import { CellViewLayout } from '../CellViewLayout';
function resolveDisplayValue(value, validation) {
    const rule = validation?.find((r) => r.type === 'specificValues');
    if (rule) {
        return rule.values.find((v) => v.id === value)?.value ?? value ?? '';
    }
    return value ?? '';
}
export const TextView = ({ value, validation }) => (React.createElement(CellViewLayout, null,
    React.createElement(FieldsTextView, { data: resolveDisplayValue(value, validation) })));
//# sourceMappingURL=View.js.map