"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _slugid = _interopRequireDefault(require("slugid"));
var _constants = require("../constants");
const checkListRule = (element, parseChild) => {
  const {
    nodeName
  } = element;
  if (nodeName === 'INPUT' && element.getAttribute('type') === 'checkbox') {
    return {
      id: _slugid.default.nice(),
      type: _constants.CHECK_LIST_ITEM,
      checked: element.getAttribute('checked') !== null,
      children: [{
        id: _slugid.default.nice(),
        text: ''
      }]
    };
  }
  return;
};
var _default = exports.default = checkListRule;