'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-c157949f.js');
const slotSelectors = require('./slotSelectors-a6d0c34c.js');

const getInputValue = (input) => {
  if (input instanceof HTMLInputElement) {
    if (input.type === 'checkbox') {
      return input.checked;
    }
    else if (input.type === 'number') {
      return Number.parseFloat(input.value);
    }
    else {
      return input.value;
    }
  }
  if (input instanceof HTMLSelectElement) {
    return input.value;
  }
};

const isValidatorType = (maybeValidator) => {
  return (maybeValidator === 'Validator' ||
    maybeValidator === 'ArrayValidator' ||
    maybeValidator === 'BooleanValidator' ||
    maybeValidator === 'ConstantValidator' ||
    maybeValidator === 'EnumValidator' ||
    maybeValidator === 'IntegerValidator' ||
    maybeValidator === 'NumberValidator' ||
    maybeValidator === 'StringValidator' ||
    maybeValidator === 'TupleValidator');
};

const getProperties$3 = (valueEl) => {
  var _a, _b;
  return {
    default: (_b = (_a = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('placeholder')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : undefined,
  };
};
const BooleanValidator = ({ valueEl, }) => {
  const values = getProperties$3(valueEl);
  return (index.h(index.Fragment, null,
    index.h("label", null,
      "Default value",
      index.h("input", { type: "checkbox", name: "default", checked: values.default === 'true' }))));
};

const ConstantValidator = () => {
  return (index.h(index.Fragment, null,
    index.h("label", null,
      "Value",
      index.h("input", { name: "value" }))));
};

const getProperties$2 = (valueEl) => {
  var _a, _b, _c, _d;
  return {
    default: (_b = (_a = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('placeholder')) !== null && _a !== void 0 ? _a : valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('value')) !== null && _b !== void 0 ? _b : undefined,
    minimum: (_c = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('min')) !== null && _c !== void 0 ? _c : undefined,
    maximum: (_d = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('max')) !== null && _d !== void 0 ? _d : undefined,
  };
};
const IntegerValidator = ({ valueEl, }) => {
  const values = getProperties$2(valueEl);
  return (index.h(index.Fragment, null,
    index.h("label", null,
      "Default value",
      index.h("input", { type: "number", name: "default", step: "1", value: values.default })),
    index.h("label", null,
      "Minimum",
      index.h("input", { type: "number", name: "minimum", step: "1", value: values.minimum })),
    index.h("label", null,
      "Maximum",
      index.h("input", { type: "number", name: "maximum", step: "1", value: values.maximum }))));
};

const getProperties$1 = (valueEl) => {
  var _a, _b, _c, _d;
  return {
    default: (_b = (_a = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('placeholder')) !== null && _a !== void 0 ? _a : valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('value')) !== null && _b !== void 0 ? _b : undefined,
    minimum: (_c = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('min')) !== null && _c !== void 0 ? _c : undefined,
    maximum: (_d = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('max')) !== null && _d !== void 0 ? _d : undefined,
  };
};
const NumberValidator = ({ valueEl, }) => {
  const values = getProperties$1(valueEl);
  return (index.h(index.Fragment, null,
    index.h("label", null,
      "Default value",
      index.h("input", { type: "number", name: "default", step: "any", value: values.default })),
    index.h("label", null,
      "Minimum",
      index.h("input", { type: "number", name: "minimum", step: "any", value: values.minimum })),
    index.h("label", null,
      "Maximum",
      index.h("input", { type: "number", name: "maximum", step: "any", value: values.maximum }))));
};

const getProperties = (valueEl) => {
  var _a, _b, _c, _d;
  return {
    default: (_a = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('placeholder')) !== null && _a !== void 0 ? _a : undefined,
    minLength: (_b = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('minLength')) !== null && _b !== void 0 ? _b : undefined,
    maxLength: (_c = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('maxLength')) !== null && _c !== void 0 ? _c : undefined,
    pattern: (_d = valueEl === null || valueEl === void 0 ? void 0 : valueEl.getAttribute('pattern')) !== null && _d !== void 0 ? _d : undefined,
  };
};
const StringValidator = ({ valueEl, }) => {
  const values = getProperties(valueEl);
  return (index.h(index.Fragment, null,
    index.h("label", null,
      "Default value",
      index.h("input", { type: "text", name: "default", value: values.default })),
    index.h("label", null,
      "Minimum length",
      index.h("input", { type: "number", step: "1", name: "minLength", value: values.minLength, min: "0" })),
    index.h("label", null,
      "Maximum length",
      index.h("input", { type: "number", step: "1", name: "maxLength", value: values.maxLength })),
    index.h("label", null,
      "Pattern (RegEx)",
      index.h("input", { type: "text", name: "pattern", value: values.pattern }))));
};

const validateField = (e) => {
  const target = e.target;
  target.reportValidity();
};
const getValidator = (valueElRef) => (validatorType) => {
  switch (validatorType) {
    case 'NumberValidator': {
      return index.h(NumberValidator, { valueEl: valueElRef });
    }
    case 'IntegerValidator': {
      return index.h(IntegerValidator, { valueEl: valueElRef });
    }
    case 'StringValidator': {
      return index.h(StringValidator, { valueEl: valueElRef });
    }
    case 'ConstantValidator': {
      return index.h(ConstantValidator, { valueEl: valueElRef });
    }
    case 'BooleanValidator': {
      return index.h(BooleanValidator, { valueEl: valueElRef });
    }
  }
};
const Validator = (props) => {
  return (index.h("stencila-menu", { autoClose: false, menuPosition: "bottom-start" },
    index.h("stencila-button", { iconOnly: true, icon: "equalizer", size: "xsmall", slot: "toggle", "aria-label": "Toggle menu", color: "key", minimal: true }),
    index.h("form", { onChange: props.onValidatorChange, onInput: validateField, onFocusin: validateField },
      index.h("label", null,
        "Type",
        index.h("select", { name: "validator" },
          index.h("option", { disabled: true, selected: props.type === undefined }, "Select\u2026"),
          index.h("option", { value: "ArrayValidator", selected: props.type === 'ArrayValidator' }, "Array"),
          index.h("option", { value: "BooleanValidator", selected: props.type === 'BooleanValidator' }, "Boolean"),
          index.h("option", { value: "ConstantValidator", selected: props.type === 'ConstantValidator' }, "Constant"),
          index.h("option", { value: "EnumValidator", selected: props.type === 'EnumValidator' }, "Enum"),
          index.h("option", { value: "IntegerValidator", selected: props.type === 'IntegerValidator' }, "Integer"),
          index.h("option", { value: "NumberValidator", selected: props.type === 'NumberValidator' }, "Number"),
          index.h("option", { value: "StringValidator", selected: props.type === 'StringValidator' }, "String"),
          index.h("option", { value: "TupleValidator", selected: props.type === 'TupleValidator' }, "Tuple"))),
      getValidator(props.valueElRef)(props.type))));
};

const defaultParameterCss = ".sc-stencila-parameter-default-h,stencila-parameter.sc-stencila-parameter-default{--background:var(--color-stock,#fff);--background-buttons:var(--color-neutral-50,#edf2f7);--border:var(--color-neutral-100,#e2e8f0);background-color:var(--background);border-color:var(--border);border-radius:.25rem;border-style:solid;border-width:1px;color:#4a4a4a;color:var(--color-key,#4a4a4a);display:-ms-inline-flexbox;display:inline-flex;font-size:.875rem;line-height:1.25rem;line-height:1;padding:0;vertical-align:text-bottom;white-space:nowrap}.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default{background-color:var(--background-buttons);cursor:default;display:inline-block;overflow:hidden;-webkit-transition-duration:.15s;transition-duration:.15s;-webkit-transition-property:color,background-color,border-color,fill,stroke,opacity,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,fill,stroke,opacity,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);width:0}[mode=edit].hover.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default,[mode=edit].sc-stencila-parameter-default-h:focus .actions.sc-stencila-parameter-default,[mode=edit].sc-stencila-parameter-default-h:focus-within .actions.sc-stencila-parameter-default,[mode=edit].sc-stencila-parameter-default-h:hover .actions.sc-stencila-parameter-default,stencila-parameter[mode=edit].hover.sc-stencila-parameter-default .actions.sc-stencila-parameter-default,stencila-parameter[mode=edit].sc-stencila-parameter-default:focus .actions.sc-stencila-parameter-default,stencila-parameter[mode=edit].sc-stencila-parameter-default:focus-within .actions.sc-stencila-parameter-default,stencila-parameter[mode=edit].sc-stencila-parameter-default:hover .actions.sc-stencila-parameter-default{display:-ms-inline-flexbox;display:inline-flex;max-width:100%;width:100%}.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:.5rem}.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default{color:var(--color-neutral-600);display:block;font-family:sans-serif;font-family:var(--font-family-body,sans-serif);font-size:.75rem;line-height:1rem}.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default:not(:first-of-type),stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default:not(:first-of-type){margin-top:.5rem}.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default input.sc-stencila-parameter-default,.sc-stencila-parameter-default-h .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default select.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default input.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .actions.sc-stencila-parameter-default form.sc-stencila-parameter-default label.sc-stencila-parameter-default select.sc-stencila-parameter-default{border-color:var(--border);border-radius:.25rem;border-style:solid;border-width:1px;display:block;font-family:monospace;font-family:var(--font-family-mono,monospace);font-size:.875rem;line-height:1.25rem;margin-top:.25rem;width:100%}.sc-stencila-parameter-default-h .name.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .name.sc-stencila-parameter-default{background-color:var(--background-buttons);cursor:text;font-family:monospace;font-family:var(--font-family-mono,monospace);padding:.25rem}.sc-stencila-parameter-default-h .name.sc-stencila-parameter-default-s>label,stencila-parameter .name.sc-stencila-parameter-default-s>label{cursor:text}.sc-stencila-parameter-default-h .value.sc-stencila-parameter-default,stencila-parameter.sc-stencila-parameter-default .value.sc-stencila-parameter-default{background-color:var(--background);font-family:monospace;font-family:var(--font-family-mono,monospace);margin:0;padding:0 .25rem}.sc-stencila-parameter-default-h .value.sc-stencila-parameter-default-s>input,.sc-stencila-parameter-default-h .value.sc-stencila-parameter-default-s>select,stencila-parameter .value.sc-stencila-parameter-default-s>input,stencila-parameter .value.sc-stencila-parameter-default-s>select{border-width:0;display:inline-block;font-family:monospace;font-family:var(--font-family-mono,monospace)}.sc-stencila-parameter-default-h .sc-stencila-parameter-default-s>input:invalid,.sc-stencila-parameter-default-h input.sc-stencila-parameter-default:invalid,stencila-parameter.sc-stencila-parameter-default-s>input:invalid,stencila-parameter .sc-stencila-parameter-default-s>input:invalid,stencila-parameter.sc-stencila-parameter-default input.sc-stencila-parameter-default:invalid{border-radius:.25rem;-webkit-box-shadow:0 0 0 2px var(--color-danger-500);box-shadow:0 0 0 2px var(--color-danger-500)}";

const materialParameterCss = ".sc-stencila-parameter-material-h,stencila-parameter.sc-stencila-parameter-material{--background:var(--color-stock,#fff);--background-buttons:var(--color-neutral-50,#edf2f7);--border:var(--color-neutral-100,#e2e8f0);background-color:var(--background);border-color:var(--border);border-radius:.25rem;border-style:solid;border-width:1px;color:#4a4a4a;color:var(--color-key,#4a4a4a);display:-ms-inline-flexbox;display:inline-flex;font-size:.875rem;line-height:1.25rem;line-height:1;padding:0;vertical-align:text-bottom;white-space:nowrap}.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material{background-color:var(--background-buttons);cursor:default;display:inline-block;overflow:hidden;-webkit-transition-duration:.15s;transition-duration:.15s;-webkit-transition-property:color,background-color,border-color,fill,stroke,opacity,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,fill,stroke,opacity,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);width:0}[mode=edit].hover.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material,[mode=edit].sc-stencila-parameter-material-h:focus .actions.sc-stencila-parameter-material,[mode=edit].sc-stencila-parameter-material-h:focus-within .actions.sc-stencila-parameter-material,[mode=edit].sc-stencila-parameter-material-h:hover .actions.sc-stencila-parameter-material,stencila-parameter[mode=edit].hover.sc-stencila-parameter-material .actions.sc-stencila-parameter-material,stencila-parameter[mode=edit].sc-stencila-parameter-material:focus .actions.sc-stencila-parameter-material,stencila-parameter[mode=edit].sc-stencila-parameter-material:focus-within .actions.sc-stencila-parameter-material,stencila-parameter[mode=edit].sc-stencila-parameter-material:hover .actions.sc-stencila-parameter-material{display:-ms-inline-flexbox;display:inline-flex;max-width:100%;width:100%}.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:.5rem}.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material{color:var(--color-neutral-600);display:block;font-family:sans-serif;font-family:var(--font-family-body,sans-serif);font-size:.75rem;line-height:1rem}.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material:not(:first-of-type),stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material:not(:first-of-type){margin-top:.5rem}.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material input.sc-stencila-parameter-material,.sc-stencila-parameter-material-h .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material select.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material input.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .actions.sc-stencila-parameter-material form.sc-stencila-parameter-material label.sc-stencila-parameter-material select.sc-stencila-parameter-material{border-color:var(--border);border-radius:.25rem;border-style:solid;border-width:1px;display:block;font-family:monospace;font-family:var(--font-family-mono,monospace);font-size:.875rem;line-height:1.25rem;margin-top:.25rem;width:100%}.sc-stencila-parameter-material-h .name.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .name.sc-stencila-parameter-material{background-color:var(--background-buttons);cursor:text;font-family:monospace;font-family:var(--font-family-mono,monospace);padding:.25rem}.sc-stencila-parameter-material-h .name.sc-stencila-parameter-material-s>label,stencila-parameter .name.sc-stencila-parameter-material-s>label{cursor:text}.sc-stencila-parameter-material-h .value.sc-stencila-parameter-material,stencila-parameter.sc-stencila-parameter-material .value.sc-stencila-parameter-material{background-color:var(--background);font-family:monospace;font-family:var(--font-family-mono,monospace);margin:0;padding:0 .25rem}.sc-stencila-parameter-material-h .value.sc-stencila-parameter-material-s>input,.sc-stencila-parameter-material-h .value.sc-stencila-parameter-material-s>select,stencila-parameter .value.sc-stencila-parameter-material-s>input,stencila-parameter .value.sc-stencila-parameter-material-s>select{border-width:0;display:inline-block;font-family:monospace;font-family:var(--font-family-mono,monospace)}.sc-stencila-parameter-material-h .sc-stencila-parameter-material-s>input:invalid,.sc-stencila-parameter-material-h input.sc-stencila-parameter-material:invalid,stencila-parameter.sc-stencila-parameter-material-s>input:invalid,stencila-parameter .sc-stencila-parameter-material-s>input:invalid,stencila-parameter.sc-stencila-parameter-material input.sc-stencila-parameter-material:invalid{border-radius:.25rem;-webkit-box-shadow:0 0 0 2px var(--color-danger-500);box-shadow:0 0 0 2px var(--color-danger-500)}";

const Parameter = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.parameterChange = index.createEvent(this, "stencila-parameter-change", 7);
    this.validatorChange = index.createEvent(this, "stencila-validator-change", 7);
    this.labelSlotRef = undefined;
    this.valueSlotRef = undefined;
    /**
     * The context of the component. In `read` mode the parameter validator and its
     * properties cannot be edited.
     */
    this.mode = 'edit';
    this.paramName = '';
    this.onParamChange = (e) => {
      const target = e.currentTarget;
      const isValid = this.validateValue(target);
      if (isValid) {
        this.parameterChange.emit({
          property: 'value',
          value: getInputValue(target),
        });
      }
    };
    this.onParamNameChange = (e) => {
      const target = e.currentTarget;
      this.parameterChange.emit({
        property: 'name',
        value: target.textContent,
      });
    };
    this.onValidatorChange = (e) => {
      const target = e.target;
      const value = getInputValue(target);
      if (target.name === 'validator' &&
        typeof value === 'string' &&
        target.value !== this.validator &&
        isValidatorType(value)) {
        this.validator = value;
        this.validatorChange.emit({
          type: 'validator',
          value,
        });
      }
      else {
        this.validatorChange.emit({
          type: 'property',
          name: target.name,
          value,
        });
      }
    };
    this.validateValue = (target) => {
      return target.reportValidity();
    };
    this.getValidatorFromMetaEl = () => {
      var _a, _b;
      const validatorMetaEl = this.el.querySelector('meta[itemprop="validator"]');
      const validatorAttrParts = (_b = (_a = validatorMetaEl === null || validatorMetaEl === void 0 ? void 0 : validatorMetaEl.getAttribute('itemtype')) === null || _a === void 0 ? void 0 : _a.split('/')) !== null && _b !== void 0 ? _b : [];
      const validatorAttr = validatorAttrParts[validatorAttrParts.length - 1];
      return isValidatorType(validatorAttr) ? validatorAttr : undefined;
    };
  }
  componentWillLoad() {
    if (this.validator === undefined) {
      this.validator = this.getValidatorFromMetaEl();
    }
    this.labelSlotRef = slotSelectors.getSlotByName(this.el)('name')[0];
    const valueEl = slotSelectors.getSlotByName(this.el)('value');
    this.valueSlotRef = valueEl[0];
    for (const input of valueEl) {
      input.addEventListener('input', this.onParamChange);
      input.addEventListener('focus', this.onParamChange);
    }
  }
  disconnectedCallback() {
    const valueEl = slotSelectors.getSlotByName(this.el)('value');
    for (const input of valueEl) {
      input.removeEventListener('input', this.onParamChange);
      input.removeEventListener('focus', this.onParamChange);
    }
  }
  render() {
    var _a, _b;
    const labelText = (_b = (_a = this.labelSlotRef) === null || _a === void 0 ? void 0 : _a.textContent) !== null && _b !== void 0 ? _b : 'parameter';
    return (index.h(index.Host, null, index.h("span", { class: "actions" }, this.mode === 'edit' && (index.h(Validator, { type: this.validator, onValidatorChange: this.onValidatorChange, valueElRef: this.valueSlotRef })), index.h("span", { class: "name", contentEditable: this.mode === 'edit', onClick: (e) => {
        if (this.mode === 'edit') {
          e.preventDefault();
        }
      }, onInput: this.onParamNameChange, ref: (el) => (this.labelSlotRef = el) }, index.h("slot", { name: "name" }))), index.h("form", { class: "value", title: labelText }, index.h("slot", { name: "value" }))));
  }
  get el() { return index.getElement(this); }
};
Parameter.style = {
  default: defaultParameterCss,
  material: materialParameterCss
};

exports.stencila_parameter = Parameter;

//# sourceMappingURL=stencila-parameter.cjs.entry.js.map