import getLocationById from "../getLocationById";
import getLocationOptions from "../getLocationOptions";
export default (_a) => {
  var _b;
  var { name = "selectLocation", locationId = null, beforeHTML = `<h1>It looks like the closest Flood Team location is in ${((_b = getLocationById(locationId)) === null || _b === void 0 ? void 0 : _b.name) || "St. Louis"}.</h1> <h2>Would you like to select a different location?</h2>`, } = _a === void 0 ? {} : _a;
  return ({
    name,
    beforeHTML,
    fields: [
      {
        name: "location",
        type: "select",
        value: locationId,
        required: true,
        placeholder: "Select a location",
        interfaceOptions: {
          header: "Flood Team Locations",
          message: "select one",
        },
        options: getLocationOptions(),
      },
    ],
  });
};
