// В файле composables/useObjects.ts обновляем fetchObjects:

const fetchObjects = async (filters?: any): Promise<ObjectItem[]> => {
  loading.value = true
  error.value = null
  
  return new Promise((resolve) => {
    setTimeout(() => {
      let filteredObjects = [...mockObjects]
      
      // Применяем фильтры
      if (filters) {
        if (filters.search) {
          const searchTerm = filters.search.toLowerCase()
          filteredObjects = filteredObjects.filter(obj => 
            obj.title.toLowerCase().includes(searchTerm) ||
            obj.city.toLowerCase().includes(searchTerm) ||
            obj.description.toLowerCase().includes(searchTerm)
          )
        }
        if (filters.type) {
          filteredObjects = filteredObjects.filter(obj => obj.type === filters.type)
        }
        if (filters.city) {
          filteredObjects = filteredObjects.filter(obj => 
            obj.city.toLowerCase().includes(filters.city.toLowerCase())
          )
        }
        if (filters.userId) {
          filteredObjects = filteredObjects.filter(obj => obj.userId === filters.userId)
        }
      }
      
      objects.value = filteredObjects
      loading.value = false
      resolve(filteredObjects)
    }, 500)
  })
}