{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "login-form-split",
  "type": "registry:item",
  "title": "Login Form Split",
  "description": "Two-column login form with email/password authentication and social login option",
  "dependencies": [
    "@mui/icons-material",
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/login-form-split/login-form-split.tsx",
      "target": "src/mui-treasury/components/login-form-split/login-form-split.tsx",
      "content": "'use client';\n\nimport React, { useState } from 'react';\n\nimport { GitHub } from '@mui/icons-material';\nimport {\n  Box,\n  Button,\n  Divider,\n  Link,\n  Stack,\n  TextField,\n  Typography,\n} from '@mui/material';\n\ninterface FormData {\n  email: string;\n  password: string;\n}\n\ninterface FormErrors {\n  email?: string;\n  password?: string;\n}\n\nexport function LoginFormSplit() {\n  const [formData, setFormData] = useState<FormData>({\n    email: '',\n    password: '',\n  });\n  const [errors, setErrors] = useState<FormErrors>({});\n\n  const handleInputChange =\n    (field: keyof FormData) => (event: React.ChangeEvent<HTMLInputElement>) => {\n      const value = event.target.value;\n      setFormData((prev) => ({ ...prev, [field]: value }));\n\n      // Clear errors on input change\n      if (errors[field]) {\n        setErrors((prev) => ({ ...prev, [field]: undefined }));\n      }\n    };\n\n  const validateForm = (): boolean => {\n    const newErrors: FormErrors = {};\n\n    if (!formData.email) {\n      newErrors.email = 'Email is required';\n    } else if (!/\\S+@\\S+\\.\\S+/.test(formData.email)) {\n      newErrors.email = 'Please enter a valid email';\n    }\n\n    if (!formData.password) {\n      newErrors.password = 'Password is required';\n    }\n\n    setErrors(newErrors);\n    return Object.keys(newErrors).length === 0;\n  };\n\n  const handleSubmit = (event: React.FormEvent) => {\n    event.preventDefault();\n    if (validateForm()) {\n      // Handle login logic here\n      console.log('Login attempt:', formData);\n    }\n  };\n\n  const handleGitHubLogin = () => {\n    // Handle GitHub login logic here\n    console.log('GitHub login attempt');\n  };\n\n  return (\n    <Box\n      sx={{\n        display: 'grid',\n        gridTemplateColumns: {\n          xs: '1fr',\n          md: '1fr minmax(500px, 1.5fr)',\n        },\n        minHeight: '100lvh',\n      }}\n    >\n      {/* Left side - Image */}\n      <Box\n        sx={(theme) => ({\n          display: {\n            xs: 'none',\n            md: 'flex',\n          },\n          height: '100lvh',\n          bgcolor: 'grey.50',\n          alignItems: 'center',\n          justifyContent: 'center',\n          p: 3,\n          ...theme.applyStyles('dark', {\n            bgcolor: 'grey.900',\n          }),\n        })}\n      >\n        <Box\n          component=\"img\"\n          src=\"https://placehold.co/600x800\"\n          alt=\"Login illustration\"\n          sx={{\n            width: '100%',\n            height: '100%',\n            objectFit: 'cover',\n            borderRadius: 2,\n            opacity: 0.2, // TODO: remove this once we have a real image\n          }}\n        />\n      </Box>\n      {/* Right side - Login Form */}\n      <Box\n        sx={{\n          display: 'flex',\n          alignItems: 'center',\n          justifyContent: 'center',\n          p: 3,\n        }}\n      >\n        <Box\n          sx={{\n            width: '100%',\n            maxWidth: 400,\n          }}\n        >\n          {/* Logo */}\n          <Stack\n            direction=\"row\"\n            spacing={1}\n            sx={{\n              alignItems: 'center',\n              position: { xs: 'static', md: 'fixed' },\n              top: '2rem',\n              left: '2rem',\n              mb: 2,\n              justifyContent: 'center',\n            }}\n          >\n            <Box\n              sx={{\n                width: 24,\n                height: 24,\n                bgcolor: 'text.primary',\n                borderRadius: 1,\n                display: 'flex',\n                alignItems: 'center',\n                justifyContent: 'center',\n              }}\n            >\n              <Box\n                sx={{\n                  width: 12,\n                  height: 12,\n                  bgcolor: 'background.paper',\n                  borderRadius: 0.5,\n                }}\n              />\n            </Box>\n            <Typography variant=\"h4\" sx={{ fontWeight: 600 }}>\n              Acme Inc.\n            </Typography>\n          </Stack>\n\n          {/* Form Header */}\n          <Box sx={{ mb: 4, textAlign: 'center' }}>\n            <Typography variant=\"h3\" sx={{ fontWeight: 600, mb: 1 }}>\n              Login to your account\n            </Typography>\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n              }}\n            >\n              Enter your email below to login to your account\n            </Typography>\n          </Box>\n\n          {/* Login Form */}\n          <Box component=\"form\" onSubmit={handleSubmit}>\n            <Stack spacing={3}>\n              {/* Email Field */}\n              <TextField\n                fullWidth\n                required\n                label=\"Email\"\n                type=\"email\"\n                placeholder=\"m@example.com\"\n                variant=\"outlined\"\n                value={formData.email}\n                onChange={handleInputChange('email')}\n                error={!!errors.email}\n                helperText={errors.email}\n              />\n\n              {/* Password Field */}\n              <Box>\n                <Box\n                  sx={{\n                    display: 'flex',\n                    alignItems: 'center',\n                    justifyContent: 'space-between',\n                    mb: 1,\n                  }}\n                >\n                  <Typography variant=\"body2\" component=\"label\">\n                    Password\n                  </Typography>\n                  <Link\n                    href=\"#\"\n                    variant=\"body2\"\n                    sx={{ textDecoration: 'none' }}\n                  >\n                    Forgot your password?\n                  </Link>\n                </Box>\n                <TextField\n                  fullWidth\n                  required\n                  type=\"password\"\n                  placeholder=\"Enter your password\"\n                  variant=\"outlined\"\n                  value={formData.password}\n                  onChange={handleInputChange('password')}\n                  error={!!errors.password}\n                  helperText={errors.password}\n                />\n              </Box>\n\n              {/* Login Button */}\n              <Button\n                type=\"submit\"\n                variant=\"contained\"\n                size=\"large\"\n                fullWidth\n                sx={{\n                  py: 1.5,\n                }}\n              >\n                Login\n              </Button>\n\n              {/* Divider */}\n              <Divider sx={{ color: 'text.secondary', fontSize: '0.875rem' }}>\n                Or continue with\n              </Divider>\n\n              {/* GitHub Login Button */}\n              <Button\n                variant=\"outlined\"\n                size=\"large\"\n                fullWidth\n                startIcon={<GitHub />}\n                onClick={handleGitHubLogin}\n                sx={{\n                  py: 1.5,\n                }}\n                aria-label=\"Login with GitHub\"\n              >\n                Login with GitHub\n              </Button>\n\n              {/* Sign Up Link */}\n              <Box sx={{ textAlign: 'center', mt: 4 }}>\n                <Typography\n                  variant=\"body2\"\n                  sx={{\n                    color: 'text.secondary',\n                  }}\n                >\n                  Don&apos;t have an account?{' '}\n                  <Link href=\"#\" sx={{ textDecoration: 'underline' }}>\n                    Sign up\n                  </Link>\n                </Typography>\n              </Box>\n            </Stack>\n          </Box>\n        </Box>\n      </Box>\n    </Box>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "components/login-form-split/index.ts",
      "target": "src/mui-treasury/components/login-form-split/index.ts",
      "content": "export * from './login-form-split';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "screenshot": "/og/login-form-split.png",
    "category": "block",
    "previewMode": "iframe",
    "exportName": "LoginFormSplit",
    "subcategory": "authentication"
  }
}