function d(e, r, n) {
  return n !== void 0 ? n : r === "year" && e.lang.yearPlaceholder ? e.lang.yearPlaceholder : r === "quarter" && e.lang.quarterPlaceholder ? e.lang.quarterPlaceholder : r === "month" && e.lang.monthPlaceholder ? e.lang.monthPlaceholder : r === "week" && e.lang.weekPlaceholder ? e.lang.weekPlaceholder : r === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.placeholder : e.lang.placeholder;
}
function l(e, r, n) {
  return n !== void 0 ? n : r === "year" && e.lang.yearPlaceholder ? e.lang.rangeYearPlaceholder : r === "quarter" && e.lang.quarterPlaceholder ? e.lang.rangeQuarterPlaceholder : r === "month" && e.lang.monthPlaceholder ? e.lang.rangeMonthPlaceholder : r === "week" && e.lang.weekPlaceholder ? e.lang.rangeWeekPlaceholder : r === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.rangePlaceholder : e.lang.rangePlaceholder;
}
function h(e, r) {
  const n = {
    adjustX: 1,
    adjustY: 1
  };
  switch (r) {
    case "bottomLeft":
      return {
        points: ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
    case "bottomRight":
      return {
        points: ["tr", "br"],
        offset: [0, 4],
        overflow: n
      };
    case "topLeft":
      return {
        points: ["bl", "tl"],
        offset: [0, -4],
        overflow: n
      };
    case "topRight":
      return {
        points: ["br", "tr"],
        offset: [0, -4],
        overflow: n
      };
    default:
      return {
        points: e === "rtl" ? ["tr", "br"] : ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
  }
}
function s(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function g(e) {
  const {
    format: r,
    picker: n,
    showHour: o,
    showMinute: i,
    showSecond: u,
    use12Hours: f
  } = e, t = s(r)[0], a = Object.assign({}, e);
  return r && Array.isArray(r) && (a.format = t), t && typeof t == "string" && (!t.includes("s") && u === void 0 && (a.showSecond = !1), !t.includes("m") && i === void 0 && (a.showMinute = !1), !t.includes("H") && !t.includes("h") && !t.includes("K") && !t.includes("k") && o === void 0 && (a.showHour = !1), (t.includes("a") || t.includes("A")) && f === void 0 && (a.use12Hours = !0)), n === "time" ? a : (typeof t == "function" && delete a.format, {
    showTime: a
  });
}
function c(e, r, n) {
  if (e === !1)
    return !1;
  const o = {
    clearIcon: r ?? n
  };
  return typeof e == "object" ? Object.assign(Object.assign({}, o), e) : o;
}
export {
  d as getPlaceholder,
  l as getRangePlaceholder,
  g as getTimeProps,
  c as mergeAllowClear,
  h as transPlacement2DropdownAlign
};
