import * as i0 from '@angular/core';
import { input, computed, Component } from '@angular/core';
import * as i1 from 'primeng/progressbar';
import { ProgressBarModule } from 'primeng/progressbar';
import * as i3 from 'primeng/knob';
import { KnobModule } from 'primeng/knob';
import * as i4 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i2 from 'primeng/api';

class Progress {
    // Required Input: The progress value (0-100)
    value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
    // Optional Inputs with Defaults
    mode = input('linear', ...(ngDevMode ? [{ debugName: "mode" }] : []));
    showLabel = input(true, ...(ngDevMode ? [{ debugName: "showLabel" }] : []));
    unit = input('%', ...(ngDevMode ? [{ debugName: "unit" }] : []));
    color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : [])); // Default Tailwind blue-500
    minValue = input(0, ...(ngDevMode ? [{ debugName: "minValue" }] : [])); // Height for linear bar
    maxValue = input(100, ...(ngDevMode ? [{ debugName: "maxValue" }] : [])); // Height for linear bar
    // Style Inputs
    height = input(20, ...(ngDevMode ? [{ debugName: "height" }] : [])); // Height for linear bar
    circleSize = input(100, ...(ngDevMode ? [{ debugName: "circleSize" }] : [])); // Diameter for circle
    strokeWidth = input(10, ...(ngDevMode ? [{ debugName: "strokeWidth" }] : [])); // Thickness for circle
    customClass = input('', ...(ngDevMode ? [{ debugName: "customClass" }] : [])); // Pass tailwind classes like 'rounded-none'
    // Computed template for the knob text (e.g. "75%")
    labelTemplate = computed(() => `{value}${this.unit()}`, ...(ngDevMode ? [{ debugName: "labelTemplate" }] : []));
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Progress, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Progress, isStandalone: true, selector: "mt-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, circleSize: { classPropertyName: "circleSize", publicName: "circleSize", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n  @if (mode() === \"linear\") {\r\n    <div class=\"w-full\">\r\n      <p-progressBar\r\n        [value]=\"value()\"\r\n        [showValue]=\"showLabel()\"\r\n        [styleClass]=\"customClass()\"\r\n        [style]=\"{ height: height() + 'px' }\"\r\n        [color]=\"color()\"\r\n      >\r\n        <ng-template pTemplate=\"content\" let-val>\r\n          @if (showLabel()) {\r\n            <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n          }\r\n        </ng-template>\r\n      </p-progressBar>\r\n    </div>\r\n  } @else {\r\n    <div class=\"relative flex items-center justify-center\">\r\n      <p-knob\r\n        [ngModel]=\"value()\"\r\n        [readonly]=\"true\"\r\n        [size]=\"circleSize()\"\r\n        [strokeWidth]=\"strokeWidth()\"\r\n        [rangeColor]=\"'#e5e7eb'\"\r\n        [valueTemplate]=\"labelTemplate()\"\r\n        [showValue]=\"showLabel()\"\r\n        [min]=\"minValue()\"\r\n        [max]=\"maxValue()\"\r\n      >\r\n      </p-knob>\r\n    </div>\r\n  }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i1.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: KnobModule }, { kind: "component", type: i3.Knob, selector: "p-knob", inputs: ["styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "valueColor", "rangeColor", "textColor", "valueTemplate", "size", "min", "max", "step", "strokeWidth", "showValue", "readonly"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Progress, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [ProgressBarModule, KnobModule, FormsModule], selector: 'mt-progress', template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n  @if (mode() === \"linear\") {\r\n    <div class=\"w-full\">\r\n      <p-progressBar\r\n        [value]=\"value()\"\r\n        [showValue]=\"showLabel()\"\r\n        [styleClass]=\"customClass()\"\r\n        [style]=\"{ height: height() + 'px' }\"\r\n        [color]=\"color()\"\r\n      >\r\n        <ng-template pTemplate=\"content\" let-val>\r\n          @if (showLabel()) {\r\n            <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n          }\r\n        </ng-template>\r\n      </p-progressBar>\r\n    </div>\r\n  } @else {\r\n    <div class=\"relative flex items-center justify-center\">\r\n      <p-knob\r\n        [ngModel]=\"value()\"\r\n        [readonly]=\"true\"\r\n        [size]=\"circleSize()\"\r\n        [strokeWidth]=\"strokeWidth()\"\r\n        [rangeColor]=\"'#e5e7eb'\"\r\n        [valueTemplate]=\"labelTemplate()\"\r\n        [showValue]=\"showLabel()\"\r\n        [min]=\"minValue()\"\r\n        [max]=\"maxValue()\"\r\n      >\r\n      </p-knob>\r\n    </div>\r\n  }\r\n</div>\r\n" }]
        }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], circleSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "circleSize", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });

/**
 * Generated bundle index. Do not edit.
 */

export { Progress };
//# sourceMappingURL=masterteam-components-progress.mjs.map
