"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const vue = require("vue");
const XEUtils = require("xe-utils");
function useCellView(props) {
  const currColumn = vue.computed(() => {
    const { renderParams } = props;
    return renderParams.column;
  });
  const currRow = vue.computed(() => {
    const { renderParams } = props;
    return renderParams.row;
  });
  const cellOptions = vue.computed(() => {
    const { renderOpts } = props;
    return renderOpts.props || {};
  });
  const cellModel = vue.computed({
    get() {
      const { renderParams } = props;
      const { row, column } = renderParams;
      return XEUtils.get(row, column.field);
    },
    set(value) {
      const { renderParams } = props;
      const { row, column } = renderParams;
      return XEUtils.set(row, column.field, value);
    }
  });
  return {
    currColumn,
    currRow,
    cellModel,
    cellOptions
  };
}
exports.useCellView = useCellView;
