#!/bin/bash

# Define the directory to search in (current directory by default)
SEARCH_DIR="."

# Define words to search for (space-separated list)
WORDS=(
    "dropdown-menu-right"
    "dropdown-menu-left"
    "data-toggle"
    "data-html"
    "data-trigger"
    "data-placemement"
    "data-title"
    "custom-select"
    "navbar-light"
    "btn-block"
)

# Define excluded subdirectories (pipe-separated for grep)
EXCLUDE_DIRS="vendor|node_modules"

# Perform the search
for WORD in "${WORDS[@]}"; do
    echo "Searching for: $WORD"
    find "$SEARCH_DIR" -type f ! -path "*/\.*" | grep -Ev "/($EXCLUDE_DIRS)/" | while read -r file; do
        if grep -q "$WORD" "$file"; then
            echo "Found '$WORD' in: $file"
        fi
    done
done

echo "Search completed."