import { Pipe } from '@angular/core';
import { stringToColour } from '../../misc/utils';
import * as i0 from "@angular/core";
/**
 * Converts string to color code
 */
export class ToColorSAPipe {
    /**
     * Converts string to color code
     * @param value - String to be converted
     */
    transform(value) {
        if (!value) {
            return null;
        }
        return stringToColour(value);
    }
}
ToColorSAPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToColorSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
ToColorSAPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: ToColorSAPipe, isStandalone: true, name: "toColor" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToColorSAPipe, decorators: [{
            type: Pipe,
            args: [{ name: 'toColor', standalone: true }]
        }] });
//# sourceMappingURL=toColor.pipe.js.map