import { jsx as _jsx } from "react/jsx-runtime";
// cli-dont-copy-file
import React, {} from "react";
const getRandomSentences = (source, sentences) => {
    const result = new Array(sentences);
    let sourceLength = source.length;
    const taken = new Array(sourceLength);
    if (sentences <= sourceLength) {
        while (sentences--) {
            const x = Math.floor(Math.random() * sourceLength);
            result[sentences] = source[x in taken ? taken[x] : x];
            taken[x] = --sourceLength in taken ? taken[sourceLength] : sourceLength;
        }
    }
    return result.join(" ").replace(/\s+/g, " ").trim();
};
export const placeholderText = (sentences, variant = "lorem") => {
    var _a;
    const wordCollection = (_a = variants === null || variants === void 0 ? void 0 : variants[variant]) !== null && _a !== void 0 ? _a : variants.lorem;
    const paragraph = getRandomSentences(wordCollection, sentences);
    return paragraph;
};
export const PlaceholderText = ({ paragraphs = 2, sentences = 4, variant = "lorem" }) => {
    let text = "";
    for (let i = 0; i < paragraphs; i++) {
        const paragraph = `<p>${placeholderText(sentences, variant)}</p>`;
        text += paragraph;
    }
    return _jsx("div", { className: "space-y-2 text-start dark:text-secondary-200", dangerouslySetInnerHTML: { __html: text } });
};
export default PlaceholderText;
const variants = {
    "lorem": [
        "Lorem ipsum dolor sit amet , consectetur adipiscing",
        "elit sed do eiusmod tempor incididunt ut labore",
        "et dolore magna aliqua. Ut enim ad minim veniam, ",
        "quis nostrud exercitation ullamco laboris nisi ut",
        "aliquip ex ea commodo consequat Duis aute irure",
        "dolor in reprehenderit in voluptate velit esse cillum",
        "dolore eu fugiat nulla pariatur Excepteur sint,",
        "occaecat cupidatat non proident sunt in culpa qui",
        "aliquip ex ea commodo consequat Duis aute irure",
        "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet",
        "elit sed do eiusmod tempor incididunt ut labore",
        "officia deserunt mollit anim id est laborum"
    ],
    "space": [
        "There is no atmosphere in space and sound cannot travel without a medium.",
        "Mercury is closest planet to sun, but venus is the hottest planet in solar system.",
        "There are between 100-400 billion stars, approximately, in the galaxy.",
        "There is a planet made of diamonds twice the size of earth.",
        "One teaspoonful of neutron star would weigh the same as the entire human population.",
        "In fact, cosmic expansion is actually accelerating.",
        "Black holes are known for their voracious appetites;",
        "Neptune only recently finished its first full post-discovery orbit in 2011.",
        "Not all planets form and stay around stars.",
        "We are all made of stardust. It sounds like a line from a poem.",
        "It takes 230 million years for our solar system to complete one single orbit around the Milky Way.",
        "Polaris, our North Star, is not leaving us anytime soon."
    ],
    "startrek": [
        "There are four lights!",
        "Things are only impossible until they are not!",
        "Sokath, his eyes uncovered! Captain Picard is stuck on planet.",
        "Logic is the beginning of wisdom, not the end.",
        "Live long, and prosper.",
        "Resistance is futile.",
        "It is possible to commit no errors and still lose, that is not a weakness, that is life.",
        "Without freedom of choice there is no creativity.",
        "You can use logic to justify almost anything. That's its power. And its flaw.",
        "Mr. Data, set heading to Alpha Quadrant, maximum warp, Engage !",
        "Change is the essential process of all existence.",
        "Insufficient facts always invite danger.",
        "What does God need with a starship."
    ]
};
//# sourceMappingURL=placeholderText.js.map