import { h } from "@stencil/core";
import { ObjectUtils } from "@sankhyalabs/core";
export const buildFile = ({ name, label, readOnly, contextName, props }) => {
  const uploadProps = ObjectUtils.removeEmptyValues({
    subTitle: props.subTitle,
    requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
      STORAGESTRATEGY: props.STORAGESTRATEGY
    })), (props.INTERNAL_FILENAME && {
      INTERNAL_FILENAME: props.INTERNAL_FILENAME
    })),
  });
  return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
};
