var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
    for (var name in all) __defProp(target, name, {
      get: all[name],
      enumerable: !0
    });
  },
  __copyProps = (to, from, except, desc) => {
    if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
      get: () => from[key],
      enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
    });
    return to;
  };
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
  value: !0
}), mod);
var List_exports = {};
__export(List_exports, {
  List: () => List,
  ListItem: () => ListItem
});
module.exports = __toCommonJS(List_exports);
var import_react_native = require("react-native-web"),
  import_tamagui = require("tamagui"),
  import_Icon = require("./Icon.cjs"),
  import_typography = require("./typography.cjs");
const List = (0, import_tamagui.styled)(import_react_native.FlatList, {
    variants: {
      fullWidth: {
        true: {
          marginLeft: -16,
          marginRight: -16
        }
      }
    }
  }),
  ListContext = (0, import_tamagui.createStyledContext)({
    lines: "one",
    focused: !1
  }),
  ListItemFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
    name: "ListFrame",
    context: ListContext,
    backgroundColor: "transparent",
    height: "$size.list_item_height",
    paddingLeft: 16,
    paddingRight: 16,
    flexDirection: "row",
    alignItems: "center",
    width: "100%",
    variants: {
      line: {
        one: {
          height: 56,
          px: 16,
          py: 8
        },
        two: {
          height: 72,
          px: 16,
          py: 8
        },
        three: {
          height: 88,
          px: 16,
          py: 12
        }
      },
      focused: {
        true: {
          backgroundColor: "$tertiaryContainer"
        }
      },
      pressable: {
        true: {
          cursor: "pointer"
        }
      },
      severity: {
        error: {
          backgroundColor: "$errorContainer"
        },
        warning: {
          backgroundColor: "$warningContainer"
        },
        success: {
          backgroundColor: "$successContainer"
        }
      }
    }
  }),
  Container = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
    name: "ListContainer",
    context: ListContext,
    flexShrink: 1,
    flexDirection: "column"
  }),
  Headline = (0, import_tamagui.styled)(import_typography.Body, {
    size: "large",
    context: ListContext,
    textAlign: "left",
    hoverStyle: {
      color: "$onSurface"
    },
    variants: {
      severity: {
        error: {
          backgroundColor: "$onErrorContainer"
        },
        success: {
          backgroundColor: "$onSuccessContainer"
        },
        warning: {
          col: "$onWarningContainer"
        }
      },
      focused: {
        true: {
          col: "$onTertiaryContainer"
        }
      }
    }
  }),
  SupportingText = (0, import_tamagui.styled)(import_typography.Body, {
    size: "medium",
    color: "$onSurfaceVariant",
    context: ListContext,
    hoverStyle: {
      color: "$onSurface"
    },
    variants: {
      severity: {
        warning: {
          col: "$onWarningContainer"
        },
        success: {
          col: "$onSuccessContainer"
        }
      },
      focused: {
        true: {
          col: "$onTertiaryContainer"
        }
      }
    }
  }),
  TrailingIcon = (0, import_tamagui.styled)(import_Icon.Icon, {
    name: "ListItemTrailingIcon",
    context: ListContext,
    size: 24,
    col: "$onSurfaceVariant",
    ContainerProps: {
      right: 0,
      marginLeft: "auto"
    },
    variants: {
      focused: {
        true: {
          col: "$onSurfaceVariant"
        }
      },
      severity: {
        warning: {
          col: "$onWarningContainer"
        },
        success: {
          col: "$onSuccessContainer"
        }
      }
    }
  }),
  TrailingItem = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
    name: "ListItemTrailingItem",
    context: ListContext,
    right: 0,
    flexDirection: "column",
    justifyContent: "center",
    alignItems: "center",
    alignContent: "center",
    marginLeft: "auto",
    height: "100%"
  }),
  LeadingAvatar = (0, import_tamagui.styled)(import_tamagui.Avatar, {
    name: "ListItemLeadingAvatar",
    context: ListContext,
    size: 40
  }),
  LeadingIcon = (0, import_tamagui.styled)(import_Icon.Icon, {
    name: "ListItemLeadingIcon",
    context: ListContext,
    size: 24,
    ContainerProps: {
      left: 0,
      marginRight: 16
    },
    col: "$onSurfaceVariant",
    variants: {
      severity: {
        warning: {
          col: "$onWarningContainer"
        }
      }
    }
  }),
  LeadingIconContainer = (0, import_tamagui.styled)(import_tamagui.View, {
    name: "ListItemLeadingIconContainer",
    context: ListContext,
    left: 0,
    marginRight: 16
  }),
  LeadingImage = (0, import_tamagui.styled)(import_tamagui.View, {
    name: "ListItemLeadingImage",
    context: ListContext,
    width: 56,
    height: 56,
    left: 0,
    marginRight: 16
  }),
  LeadingItem = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
    name: "ListItemLeadingItem",
    context: ListContext,
    justifyContent: "center",
    alignItems: "center",
    width: 56,
    height: 56,
    left: 0,
    marginRight: 16
  }),
  ListItem = (0, import_tamagui.withStaticProperties)(ListItemFrame, {
    props: ListContext.Provider,
    Container,
    Headline,
    LeadingAvatar,
    LeadingItem,
    LeadingIcon,
    LeadingIconContainer,
    LeadingImage,
    SupportingText,
    TrailingIcon,
    TrailingItem
  });