package org.jetbrains.compose.intellij.platform.sample

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.openapi.project.Project

class ComposeDemoAction1 : DumbAwareAction() {
    override fun actionPerformed(e: AnActionEvent) {
        ComposeDemoDialog1(e.project).show()
    }
}

class ComposeDemoDialog1(project: Project?) : AbstractComposeDemoDialog(project) {
    init {
        title = "Demo Dialog 1"
    }

    @Composable
    override fun dialogContent() {
        Row {
            Column(
                modifier = Modifier.fillMaxHeight().weight(1f)
            ) {
                Buttons()
                Loaders()
                TextInputs()
                Toggles()
            }
        }
    }
}
