public function rules(): array 	{ 		return [ 			'title' => ['required', 'string', 'max:100'], 			'period_from' => ['nullable', 'date', 'required_with:period_to'], 			'period_to' => ['required', 'date', 'after:period_from'], 			'is_percentage' => ['boolean'], 			'amount' => ['required', 'numeric', 'min:0'], 			'active' => ['boolean'], 			'add_up_with_other_discounts' => ['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'], 		]; 	}