import type { EmbeddedValidationRule, EmbeddedValidationRuleFn } from "quasar";

export type QuasarRules = Record<EmbeddedValidationRule, EmbeddedValidationRuleFn>;
type EmployeeProfileValidationRule<T> = EmbeddedValidationRule | ((value: T, rules: QuasarRules, error_message: string) => boolean | string | Promise<boolean | string>);

export const useEmployeeProfileRules = () => {
    const isNotEmpty: EmployeeProfileValidationRule<unknown> = (value, _rules, error_message) => (value !== undefined && value !== null && value !== '') || error_message;

    return {
        isNotEmpty,
    }
}

export const company_options = ['Targo', 'Solucom'];