import { getSizeStyles as e } from "../../../../utils/getSizeStyles/getSizeStyles.js";
import { getTypographyStyles as s } from "../../../../utils/getTypographyStyles.js";
import { getInputAlignmentIconButtonOverrides as o } from "../../../../utils/getInputAlignmentIconButtonOverrides/getInputAlignmentIconButtonOverrides.js";
const p = {
  /**
   * Estilos para el DatePicker de MUI.
   * Permite personalizar los estilos del componente DatePicker.
   */
  root: {},
  /**
   * Estilos para el TextField de MUI.
   */
  textField: ({ theme: a, ownerState: i }) => ({
    "& .MuiInputAdornment-root": {
      ...e(a, i?.size || "medium", "action", (r) => ({
        minWidth: `calc(${r} - 2px)`,
        minHeight: `calc(${r} - 2px)`
      }))
    },
    "& .MuiFormLabel-root": {
      display: "none"
    }
  }),
  /**
   * Estilos para el layout de MUI.
   */
  layout: ({ theme: a, ownerState: i }) => ({
    "& .MuiDateCalendar-root": {
      maxWidth: "244px",
      height: "fit-content",
      gap: a.vars.size.baseSpacings.sp3,
      "& .MuiPickersFadeTransitionGroup-root": {
        "& .MuiYearCalendar-root": {
          display: "grid",
          gridTemplateColumns: "repeat(auto-fill, minmax(50px, 1fr));",
          justifyContent: "space-between",
          width: "100%",
          rowGap: a.vars.size.baseSpacings.sp2,
          "& .MuiPickersYear-root": {
            width: a.vars.size.baseSpacings.sp10,
            "& .MuiPickersYear-yearButton": {
              borderRadius: a.vars.size.borderRadius["r1-5"],
              ...e(a, i?.size || "medium", "action", (r) => ({
                height: r
              })),
              ...s(a.generalSettings.isMobile, i?.size || "medium", "bodyStandard"),
              margin: 0,
              padding: 0,
              "&:hover": {
                backgroundColor: a.vars.palette.default.hoverOpacity
              },
              "&:active": {
                backgroundColor: a.vars.palette.default.active
              },
              "&.Mui-selected": {
                backgroundColor: a.vars.palette.primary.enabled,
                color: a.vars.palette.primary.contrastText,
                "&:hover": {
                  backgroundColor: a.vars.palette.primary.hover
                },
                "&:active": {
                  backgroundColor: a.vars.palette.primary.active
                }
              }
            }
          }
        }
      },
      "& .MuiDayCalendar-root": {
        minHeight: "fit-content",
        "& .MuiDayCalendar-header": {
          height: a.vars.size.baseSpacings.sp7,
          width: "100%",
          gap: a.vars.size.baseSpacings.sp1,
          justifyContent: "flex-start",
          margin: 0,
          padding: 0,
          "& .MuiDayCalendar-weekDayLabel": {
            height: a.vars.size.baseSpacings.sp7,
            width: a.vars.size.baseSpacings.sp7,
            ...s(a.generalSettings.isMobile, i?.size || "medium", "bodyStandard"),
            color: a.vars.palette.text.secondary,
            display: "flex",
            alignItems: "center",
            justifyContent: "center"
          }
        },
        "& .MuiPickersSlideTransition-root": {
          minHeight: "168px",
          "& .MuiDayCalendar-weekContainer": {
            height: "fit-content",
            gap: a.vars.size.baseSpacings.sp1,
            justifyContent: "flex-start",
            margin: 0,
            padding: 0,
            "& .MuiPickersDay-root": {
              borderRadius: a.vars.size.borderRadius["r1-5"],
              height: a.vars.size.baseSpacings.sp7,
              width: a.vars.size.baseSpacings.sp7,
              color: a.vars.palette.text.primary,
              display: "flex",
              alignItems: "center",
              justifyContent: "center",
              ...s(a.generalSettings.isMobile, i?.size || "medium", "bodyStandard"),
              "&.Mui-selected": {
                backgroundColor: a.vars.palette.primary.enabled,
                color: a.vars.palette.primary.contrastText,
                "&:hover": {
                  backgroundColor: a.vars.palette.primary.hover
                },
                "&:active": {
                  backgroundColor: a.vars.palette.primary.active
                }
              },
              "&:hover": {
                backgroundColor: a.vars.palette.default.hoverOpacity
              },
              "&:active": {
                backgroundColor: a.vars.palette.default.active
              }
            }
          }
        }
      }
    }
  }),
  /**
   * Estilos para el desktopPaper de MUI.
   */
  desktopPaper: ({ theme: a }) => ({
    // Overrides
    backgroundColor: a.vars.palette.background.default,
    borderRadius: a.vars.size.borderRadius.r2,
    boxShadow: a.vars.customShadows.z4,
    padding: a.vars.size.baseSpacings.sp3,
    gap: a.vars.size.baseSpacings.sp1
  }),
  /**
   * Estilos para el calendarHeader de MUI.
   */
  calendarHeader: ({ theme: a, ownerState: i }) => ({
    "&&&.MuiPickersCalendarHeader-root": {
      margin: 0,
      padding: 0,
      minHeight: "fit-content",
      maxHeight: "fit-content",
      "& .MuiPickersCalendarHeader-labelContainer": {
        ...e(a, i?.size || "medium", "action", (r) => ({
          height: r,
          minHeight: r,
          maxHeight: r
        })),
        paddingLeft: a.vars.size.baseSpacings.sp3,
        paddingRight: 0,
        paddingTop: 0,
        paddingBottom: 0,
        border: `1px solid ${a.vars.palette.border.secondary}`,
        borderRadius: a.vars.size.borderRadius["r1-5"],
        "& .MuiPickersCalendarHeader-label": {
          ...s(a.generalSettings.isMobile, i?.size || "medium", "bodyStandard")
        }
      },
      "& .MuiPickersArrowSwitcher-root": {
        minWidth: "52px",
        gap: a.vars.size.baseSpacings["sp0-5"],
        justifyContent: "space-between"
      }
    }
  }),
  /**
   * Styles for the local M4L IconButton override used by input adornments.
   */
  iconButton: ({ theme: a, ownerState: i }) => ({
    ...i?.isInputAdornment ? o(a, i?.size) : {}
  }),
  /**
   * Estilos para el actionsContainer de M4L.
   */
  actionsContainer: ({ theme: a }) => ({
    paddingLeft: a.vars.size.baseSpacings.sp6,
    paddingRight: a.vars.size.baseSpacings.sp6,
    paddingBottom: a.vars.size.baseSpacings.sp4
  }),
  /**
   * Estilos para el dialog de MUI.
   */
  dialog: ({ theme: a }) => ({
    "& .MuiPaper-root": {
      borderRadius: a.vars.size.borderRadius.r2
    }
  })
};
export {
  p as datePickerStyles
};
