import React from 'react';

const SearchModification = () => {
    return (
        <div className="widget-container">
            <div className="widget-header">
                <h3>Search Modification</h3>
                <div className="widget-actions">
                    <button className="btn-primary">New Mod</button>
                    <button className="btn-secondary">Filters</button>
                </div>
            </div>
            <div className="widget-content">
                <div style={{ padding: '1rem', background: 'var(--bg-secondary)', borderRadius: '8px', marginBottom: '1rem' }}>
                    <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr 1fr auto', gap: '1rem' }}>
                        <input type="text" placeholder="Mod Number / STC" style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }} />
                        <input type="text" placeholder="Applicability (Model)" style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }} />
                        <select style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }}>
                            <option>All Status</option>
                            <option>Open</option>
                            <option>Closed</option>
                        </select>
                        <button className="btn-primary">Search</button>
                    </div>
                </div>

                <div style={{ overflowX: 'auto' }}>
                    <table style={{ width: '100%', borderCollapse: 'collapse', marginTop: '1rem' }}>
                        <thead>
                            <tr style={{ borderBottom: '1px solid var(--border-color)', textAlign: 'left' }}>
                                <th style={{ padding: '1rem' }}>Mod Number</th>
                                <th style={{ padding: '1rem' }}>Title</th>
                                <th style={{ padding: '1rem' }}>Type</th>
                                <th style={{ padding: '1rem' }}>Applicability</th>
                                <th style={{ padding: '1rem' }}>Mandatory?</th>
                                <th style={{ padding: '1rem' }}>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr style={{ borderBottom: '1px solid var(--border-color)' }}>
                                <td style={{ padding: '1rem' }}>MOD-139-001</td>
                                <td style={{ padding: '1rem' }}>Searchlight Installation</td>
                                <td style={{ padding: '1rem' }}>Optional</td>
                                <td style={{ padding: '1rem' }}>AW139</td>
                                <td style={{ padding: '1rem' }}>No</td>
                                <td style={{ padding: '1rem' }}><button className="btn-sm">View</button></td>
                            </tr>
                            <tr style={{ borderBottom: '1px solid var(--border-color)' }}>
                                <td style={{ padding: '1rem' }}>AD-2025-004</td>
                                <td style={{ padding: '1rem' }}>Tail Rotor Inspection</td>
                                <td style={{ padding: '1rem' }}>AD</td>
                                <td style={{ padding: '1rem' }}>AW139</td>
                                <td style={{ padding: '1rem' }}><span style={{ color: '#e74c3c' }}>Yes</span></td>
                                <td style={{ padding: '1rem' }}><button className="btn-sm">View</button></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    );
};

export default SearchModification;
