text: import { format, isTypedFieldDef, isValueDef } from '../../../channeldef';
  import { formatSignalRef } from '../../common';
  import { wrapCondition } from './conditional';
  export function text(model, channel = 'text') {
      const channelDef = model.encoding[channel];
      return wrapCondition(model, channelDef, channel, cDef => textRef(cDef, model.config));
  }
  export function textRef(channelDef, config, expr = 'datum') {
      // text
      if (channelDef) {
          if (isValueDef(channelDef)) {
              return { value: channelDef.value };
          }
          if (isTypedFieldDef(channelDef)) {
              return formatSignalRef(channelDef, format(channelDef), expr, config);
          }
      }
      return undefined;
  }
  //# sourceMappingURL=text.js.map