import { h } from "@stencil/core";
import { CheckMode } from "../../../ez-check/CheckMode";
export const buildSwitch = (field) => {
  return buildField(field.name, field.label, field.readOnly, field.contextName, true);
};
export const buildCheckBox = (field) => {
  return buildField(field.name, field.label, field.readOnly, field.contextName, false);
};
function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
  return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-bottom--large" }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
}
