{
  "extends": "next/core-web-vitals",
  "overrides": [
    {
      "files": ["app/accounting/**/*", "src/modules/accounting/**/*"],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/beauty/**",
                  "@/components/healthcare/**",
                  "@/modules/beauty/**",
                  "@/modules/healthcare/**",
                  "@/src/modules/beauty/**",
                  "@/src/modules/healthcare/**"
                ],
                "message": "Accounting must not import beauty or healthcare modules."
              }
            ]
          }
        ]
      }
    },
    {
      "files": ["app/beauty/**/*", "modules/beauty/**/*"],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/accounting/**",
                  "@/components/healthcare/**",
                  "@/modules/accounting/**",
                  "@/modules/healthcare/**",
                  "@/src/modules/accounting/**",
                  "@/src/modules/healthcare/**"
                ],
                "message": "Beauty must not import accounting or healthcare modules."
              }
            ]
          }
        ]
      }
    },
    {
      "files": ["app/healthcare/**/*", "src/modules/healthcare/**/*"],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/accounting/**",
                  "@/components/beauty/**",
                  "@/modules/beauty/**",
                  "@/modules/accounting/**",
                  "@/src/modules/beauty/**",
                  "@/src/modules/accounting/**"
                ],
                "message": "Healthcare must not import accounting or beauty modules."
              }
            ]
          }
        ]
      }
    },
    {
      "files": ["app/crm/**/*", "modules/crm/**/*"],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/accounting/**",
                  "@/components/beauty/**",
                  "@/components/healthcare/**",
                  "@/modules/beauty/**",
                  "@/modules/healthcare/**",
                  "@/modules/accounting/**",
                  "@/src/modules/accounting/**",
                  "@/src/modules/healthcare/**"
                ],
                "message": "CRM must not import accounting, beauty, or healthcare modules."
              }
            ]
          }
        ]
      }
    },
    {
      "files": ["app/delivery/**/*", "modules/delivery/**/*"],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/accounting/**",
                  "@/components/beauty/**",
                  "@/components/healthcare/**",
                  "@/modules/beauty/**",
                  "@/modules/accounting/**",
                  "@/modules/hospitality/**",
                  "@/modules/crm/**",
                  "@/src/modules/healthcare/**",
                  "@/src/modules/accounting/**"
                ],
                "message": "Delivery must not import other business modules."
              }
            ]
          }
        ]
      }
    },
    {
      "files": [
        "components/ds/**/*",
        "shared/**/*",
        "components/providers/**/*",
        "src/shared/**/*",
        "components/AuthGuard.tsx",
        "components/AdminAuthGuard.tsx",
        "components/ThemeProvider.tsx",
        "components/SiteHeader.tsx",
        "hooks/**/*"
      ],
      "rules": {
        "no-restricted-imports": [
          "error",
          {
            "patterns": [
              {
                "group": [
                  "@/components/accounting/**",
                  "@/components/beauty/**",
                  "@/components/healthcare/**",
                  "@/modules/beauty/**",
                  "@/modules/healthcare/**",
                  "@/modules/hospitality/**",
                  "@/modules/delivery/**",
                  "@/src/modules/healthcare/**",
                  "@/src/modules/accounting/**",
                  "@/modules/accounting/**",
                  "@/modules/crm/**"
                ],
                "message": "Shared/platform code must not import business module code."
              }
            ]
          }
        ]
      }
    }
  ]
}
