import $ from 'jquery';
import 'jquery-circle-progress';

export const initCircleProgress = () => {
    const progressBarOptions = {
        startAngle: -1.55,
        size: 120,
        value: 0.75, // 75% as 0.75
        fill: { color: '#FF8983' },
    };

    $('.circle')
        .circleProgress(progressBarOptions)
        .on('circle-animation-progress', function (event, progress, stepValue) {
            const percentage = Math.round(stepValue * 100); // Convert to percentage
            $(this).find('strong').text(`${percentage}%`);
        });

    $('#circle-b').circleProgress({
        value: 0.25,
    });

    $('#circle-c').circleProgress({
        value: 0.92,
    });
};
