public function rules(): array 	{ 		return [ 			'title' => ['required', 'string', 'max:100'], 			'max_use' => ['required', 'integer', 'min:0'], 			'period_from' => ['nullable', 'date', 'required_with:period_to'], 			'period_to' => ['nullable', 'date', 'after:period_from'], 			'is_percentage' => ['boolean'], 			'amount' => ['required', 'numeric', 'min:0'], 			'active' => ['boolean'], 			'categories' => ['array', Rule::requiredIf($this->active && empty($this->products))], 			'categories.*' => ['nullable', 'uuid', 'exists:categories,id'], 			'products' => ['array', Rule::requiredIf($this->active && empty($this->categories))], 			'products.*' => ['nullable', 'uuid', 'exists:products,id'], 		]; 	}