function CreateVideo() {
// Option data
const options = [
{
label: "Insert YouTube Video URL",
note: (
<>
Already have a video on YouTube?
Add it in seconds!
),
activeImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/Link-2.webp",
defaultImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/yt-link.webp",
redirect: "/import-youtube-url",
},
{
label: "Insert YouTube Channel URL",
note: (
<>
Want to showcase all your best
videos? Link your channel!
),
activeImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/Youtube-Active.webp",
defaultImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/Youtube-(1).webp",
redirect: "/import-channel-url",
hidden: true, // This option is hidden by default (d-none)
},
{
label: "Create a Video Using the Platform",
note: (
<>
Make a video right here
with our easy-to-use tools!
),
activeImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/Create-Active.webp",
defaultImg:
"https://media.owlapplicationbuilder.com/files/get_local_vip_1580295343903_2/media/public/Video.webp",
redirect: "/create-video-with-platform",
},
];
// State for active card
const [activeCard, setActiveCard] = React.useState(0);
// Button text based on active card
function getCreateButtonText() {
if (activeCard === 0) return "Insert YouTube Video";
if (activeCard === 1) return "Insert YouTube Channel";
if (activeCard === 2) return "Create a Video";
return "Create a Video";
}
// Handle create button click
function handleCreate() {
if (activeCard == null) {
if (typeof showToast === "function") {
showToast(
"Please select an option",
"Select your preferred way to create videos",
"#721c24",
"#dc3545",
3000,
false
);
} else {
alert("Please select your way to create videos");
}
return;
}
window.location.href = options[activeCard].redirect;
}
// Handle cancel button click
function handleCancel() {
if (window.history.length > 1) {
window.history.back();
} else {
window.location.href = "/";
}
}
render(
<>
Create/Upload Your Awesome Video
Showcase your business with engaging video content. Choose the method that works best for you and start capturing attention today!
Create Videos Your Way - Quick & Easy!
Engage your audience with powerful videos! Choose from three simple ways to add video content and showcase your business effortlessly.