buildCustomInput = (id, attrs) => {
  const __ = getReq__();
  return (
    button(
      {
        type: "button",
        id: `${id}-custom-button`,
        class: attrs.button_style,
        onclick: `document.getElementById('${id}').click()`,
      },
      attrs?.label ? attrs.label : __("Choose File")
    ) +
    span(
      {
        id: `${id}-custom-text`,
        class: "custom-file-label",
      },
      __("No file chosen")
    ) +
    script(
      domReady(
        `document.getElementById('${id}').addEventListener('change', (e) => {
          document.getElementById('${id}-custom-text').textContent = e.target.files[0].name;
        })`
      )
    )
  );
}
@category saltcorn-data
@module base-plugin/fileview
@subcategory base-plugin