import React from 'react';
import './Loading.css';

const Loading = ({ type = 'spinner', message = '로딩 중...' }) => {
    if (type === 'skeleton') {
        return (
            <div className="loading-skeleton">
                <div className="loading-skeleton__line" style={{ width: '60%' }}></div>
                <div className="loading-skeleton__line" style={{ width: '80%' }}></div>
                <div className="loading-skeleton__line" style={{ width: '40%' }}></div>
            </div>
        );
    }

    return (
        <div className="loading-spinner">
            <div className="loading-spinner__circle"></div>
            {message && <p className="loading-spinner__text">{message}</p>}
        </div>
    );
};

export default Loading;
