const FRAMEWORK_TARGETS = {
  react: ["shadcn", "mui", "antd"],
  vue: ["vuetify", "elementPlus", "primeVue"],
  svelte: ["carbon", "svelteui"],
  angular: ["angularMaterial", "primeNg"],
  runtime: ["runtime"]
};
const VARIANT_MAPPING = {
  primary: {
    shadcn: "default",
    mui: "contained",
    antd: "primary",
    vuetify: "primary",
    elementPlus: "primary",
    primeVue: "primary",
    carbon: "primary",
    svelteui: "primary",
    angularMaterial: "primary",
    primeNg: "primary",
    runtime: "primary",
    semantic: "primary-action"
  },
  secondary: {
    shadcn: "secondary",
    mui: "outlined",
    antd: "default",
    vuetify: "secondary",
    elementPlus: "default",
    primeVue: "secondary",
    carbon: "secondary",
    svelteui: "secondary",
    angularMaterial: "accent",
    primeNg: "secondary",
    runtime: "secondary",
    semantic: "secondary-action"
  },
  destructive: {
    shadcn: "destructive",
    mui: "error",
    antd: "danger",
    vuetify: "error",
    elementPlus: "danger",
    primeVue: "danger",
    carbon: "danger",
    svelteui: "error",
    angularMaterial: "warn",
    primeNg: "danger",
    runtime: "destructive",
    semantic: "destructive-action"
  },
  ghost: {
    shadcn: "ghost",
    mui: "text",
    antd: "link",
    vuetify: "text",
    elementPlus: "text",
    primeVue: "text",
    carbon: "ghost",
    svelteui: "ghost",
    angularMaterial: "basic",
    primeNg: "text",
    runtime: "ghost",
    semantic: "minimal-action"
  },
  outline: {
    shadcn: "outline",
    mui: "outlined",
    antd: "default",
    vuetify: "outlined",
    elementPlus: "plain",
    primeVue: "outlined",
    carbon: "tertiary",
    svelteui: "outline",
    angularMaterial: "stroked",
    primeNg: "outlined",
    runtime: "outline",
    semantic: "outlined-action"
  }
};
const SIZE_MAPPING = {
  small: {
    shadcn: "sm",
    mui: "small",
    antd: "small",
    vuetify: "small",
    elementPlus: "small",
    primeVue: "small",
    carbon: "sm",
    svelteui: "sm",
    angularMaterial: "small",
    primeNg: "small",
    runtime: "small",
    semantic: "compact"
  },
  medium: {
    shadcn: "default",
    mui: "medium",
    antd: "middle",
    vuetify: "default",
    elementPlus: "default",
    primeVue: "default",
    carbon: "md",
    svelteui: "md",
    angularMaterial: "medium",
    primeNg: "medium",
    runtime: "medium",
    semantic: "standard"
  },
  large: {
    shadcn: "lg",
    mui: "large",
    antd: "large",
    vuetify: "large",
    elementPlus: "large",
    primeVue: "large",
    carbon: "lg",
    svelteui: "lg",
    angularMaterial: "large",
    primeNg: "large",
    runtime: "large",
    semantic: "spacious"
  }
};
const COLOR_MAPPING = {
  primary: {
    shadcn: "primary",
    mui: "primary",
    antd: "primary",
    vuetify: "primary",
    elementPlus: "primary",
    primeVue: "primary",
    carbon: "blue",
    svelteui: "primary",
    angularMaterial: "primary",
    primeNg: "primary",
    runtime: "primary",
    semantic: "primary-color"
  },
  success: {
    shadcn: "success",
    mui: "success",
    antd: "success",
    vuetify: "success",
    elementPlus: "success",
    primeVue: "success",
    carbon: "green",
    svelteui: "success",
    angularMaterial: "success",
    primeNg: "success",
    runtime: "success",
    semantic: "positive-feedback"
  },
  warning: {
    shadcn: "warning",
    mui: "warning",
    antd: "warning",
    vuetify: "warning",
    elementPlus: "warning",
    primeVue: "warning",
    carbon: "yellow",
    svelteui: "warning",
    angularMaterial: "warn",
    primeNg: "warning",
    runtime: "warning",
    semantic: "caution-feedback"
  },
  error: {
    shadcn: "destructive",
    mui: "error",
    antd: "error",
    vuetify: "error",
    elementPlus: "error",
    primeVue: "danger",
    carbon: "red",
    svelteui: "error",
    angularMaterial: "warn",
    primeNg: "danger",
    runtime: "error",
    semantic: "negative-feedback"
  },
  info: {
    shadcn: "default",
    mui: "info",
    antd: "info",
    vuetify: "info",
    elementPlus: "info",
    primeVue: "info",
    carbon: "cyan",
    svelteui: "info",
    angularMaterial: "primary",
    primeNg: "info",
    runtime: "info",
    semantic: "informational-feedback"
  }
};
const POSITION_MAPPING = {
  top: {
    shadcn: "top",
    mui: "top",
    antd: "top",
    vuetify: "top",
    elementPlus: "top",
    primeVue: "top",
    carbon: "top",
    svelteui: "top",
    angularMaterial: "above",
    primeNg: "top",
    runtime: "top",
    semantic: "top-position"
  },
  bottom: {
    shadcn: "bottom",
    mui: "bottom",
    antd: "bottom",
    vuetify: "bottom",
    elementPlus: "bottom",
    primeVue: "bottom",
    carbon: "bottom",
    svelteui: "bottom",
    angularMaterial: "below",
    primeNg: "bottom",
    runtime: "bottom",
    semantic: "bottom-position"
  },
  left: {
    shadcn: "left",
    mui: "left",
    antd: "left",
    vuetify: "left",
    elementPlus: "left",
    primeVue: "left",
    carbon: "left",
    svelteui: "left",
    angularMaterial: "before",
    primeNg: "left",
    runtime: "left",
    semantic: "left-position"
  },
  right: {
    shadcn: "right",
    mui: "right",
    antd: "right",
    vuetify: "right",
    elementPlus: "right",
    primeVue: "right",
    carbon: "right",
    svelteui: "right",
    angularMaterial: "after",
    primeNg: "right",
    runtime: "right",
    semantic: "right-position"
  }
};
const ORIENTATION_MAPPING = {
  horizontal: {
    shadcn: "horizontal",
    mui: "horizontal",
    antd: "horizontal",
    vuetify: "horizontal",
    elementPlus: "horizontal",
    primeVue: "horizontal",
    carbon: "horizontal",
    svelteui: "horizontal",
    angularMaterial: "horizontal",
    primeNg: "horizontal",
    runtime: "horizontal",
    semantic: "horizontal-layout"
  },
  vertical: {
    shadcn: "vertical",
    mui: "vertical",
    antd: "vertical",
    vuetify: "vertical",
    elementPlus: "vertical",
    primeVue: "vertical",
    carbon: "vertical",
    svelteui: "vertical",
    angularMaterial: "vertical",
    primeNg: "vertical",
    runtime: "vertical",
    semantic: "vertical-layout"
  }
};
const COMMON_PROPERTY_MAPPINGS = {
  variant: VARIANT_MAPPING,
  size: SIZE_MAPPING,
  color: COLOR_MAPPING,
  position: POSITION_MAPPING,
  orientation: ORIENTATION_MAPPING
};
const COMPONENT_SPECIFIC_MAPPINGS = {
  table: {
    size: {
      small: {
        shadcn: "sm",
        mui: "small",
        antd: "small",
        vuetify: "small",
        elementPlus: "small",
        primeVue: "small",
        carbon: "sm",
        svelteui: "compact",
        angularMaterial: "small",
        primeNg: "small",
        runtime: "small",
        semantic: "compact-table"
      },
      medium: {
        shadcn: "default",
        mui: "medium",
        antd: "middle",
        vuetify: "default",
        elementPlus: "default",
        primeVue: "default",
        carbon: "md",
        svelteui: "default",
        angularMaterial: "medium",
        primeNg: "medium",
        runtime: "medium",
        semantic: "standard-table"
      },
      large: {
        shadcn: "lg",
        mui: "large",
        antd: "large",
        vuetify: "large",
        elementPlus: "large",
        primeVue: "large",
        carbon: "lg",
        svelteui: "relaxed",
        angularMaterial: "large",
        primeNg: "large",
        runtime: "large",
        semantic: "spacious-table"
      }
    }
  },
  input: {
    variant: {
      // Inputs use different variant semantics
      filled: {
        shadcn: "default",
        mui: "filled",
        antd: "filled",
        vuetify: "filled",
        elementPlus: "default",
        primeVue: "filled",
        carbon: "default",
        svelteui: "filled",
        angularMaterial: "fill",
        primeNg: "filled",
        runtime: "filled",
        semantic: "filled-input"
      },
      outlined: {
        shadcn: "outline",
        mui: "outlined",
        antd: "outlined",
        vuetify: "outlined",
        elementPlus: "default",
        primeVue: "outlined",
        carbon: "outline",
        svelteui: "outlined",
        angularMaterial: "outline",
        primeNg: "outlined",
        runtime: "outlined",
        semantic: "outlined-input"
      },
      standard: {
        shadcn: "default",
        mui: "standard",
        antd: "borderless",
        vuetify: "underlined",
        elementPlus: "default",
        primeVue: "standard",
        carbon: "default",
        svelteui: "standard",
        angularMaterial: "standard",
        primeNg: "standard",
        runtime: "standard",
        semantic: "standard-input"
      }
    }
  },
  badge: {
    variant: {
      // Badges use different variant semantics
      dot: {
        shadcn: "default",
        mui: "dot",
        antd: "default",
        vuetify: "dot",
        elementPlus: "default",
        primeVue: "default",
        carbon: "default",
        svelteui: "dot",
        angularMaterial: "default",
        primeNg: "default",
        runtime: "dot",
        semantic: "notification-indicator"
      },
      standard: {
        shadcn: "default",
        mui: "standard",
        antd: "default",
        vuetify: "default",
        elementPlus: "default",
        primeVue: "default",
        carbon: "default",
        svelteui: "default",
        angularMaterial: "default",
        primeNg: "default",
        runtime: "standard",
        semantic: "count-indicator"
      }
    }
  }
};
function mapProperty(componentType, propertyName, specverseValue, target) {
  if (typeof specverseValue !== "string") {
    return specverseValue;
  }
  const componentMapping = COMPONENT_SPECIFIC_MAPPINGS[componentType]?.[propertyName]?.[specverseValue];
  if (componentMapping && target in componentMapping) {
    return componentMapping[target];
  }
  const commonMapping = COMMON_PROPERTY_MAPPINGS[propertyName]?.[specverseValue];
  if (commonMapping && target in commonMapping) {
    return commonMapping[target];
  }
  return specverseValue;
}
function getSemanticMeaning(propertyName, specverseValue) {
  const commonMapping = COMMON_PROPERTY_MAPPINGS[propertyName]?.[specverseValue];
  if (commonMapping && "semantic" in commonMapping) {
    return commonMapping.semantic;
  }
  return `${propertyName}-${specverseValue}`;
}
function mapProperties(componentType, properties, target) {
  const mappedProperties = {};
  for (const [propName, propValue] of Object.entries(properties)) {
    mappedProperties[propName] = mapProperty(
      componentType,
      propName,
      propValue,
      target
    );
  }
  return mappedProperties;
}
function getFrameworkTargets(category) {
  return FRAMEWORK_TARGETS[category];
}
function hasMapping(componentType, propertyName, specverseValue, target) {
  const componentMapping = COMPONENT_SPECIFIC_MAPPINGS[componentType]?.[propertyName]?.[specverseValue];
  if (componentMapping && target in componentMapping) {
    return true;
  }
  const commonMapping = COMMON_PROPERTY_MAPPINGS[propertyName]?.[specverseValue];
  if (commonMapping && target in commonMapping) {
    return true;
  }
  return false;
}
function getAllMappings(componentType, propertyName, specverseValue) {
  const componentMapping = COMPONENT_SPECIFIC_MAPPINGS[componentType]?.[propertyName]?.[specverseValue];
  if (componentMapping) {
    return componentMapping;
  }
  const commonMapping = COMMON_PROPERTY_MAPPINGS[propertyName]?.[specverseValue];
  if (commonMapping) {
    return commonMapping;
  }
  return null;
}
export {
  COLOR_MAPPING,
  COMMON_PROPERTY_MAPPINGS,
  COMPONENT_SPECIFIC_MAPPINGS,
  FRAMEWORK_TARGETS,
  ORIENTATION_MAPPING,
  POSITION_MAPPING,
  SIZE_MAPPING,
  VARIANT_MAPPING,
  getAllMappings,
  getFrameworkTargets,
  getSemanticMeaning,
  hasMapping,
  mapProperties,
  mapProperty
};
