import React from 'react';

const SearchEquipment = () => {
    return (
        <div className="widget-container">
            <div className="widget-header">
                <h3>Search Equipment</h3>
                <div className="widget-actions">
                    <button className="btn-primary">Add New Equipment</button>
                    <button className="btn-secondary">Scanner</button>
                </div>
            </div>
            <div className="widget-content">
                <div style={{ padding: '1rem', background: 'var(--bg-secondary)', borderRadius: '8px', marginBottom: '1rem' }}>
                    <h4 style={{ marginBottom: '1rem' }}>Filters</h4>
                    <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '1rem' }}>
                        <input type="text" placeholder="Part Number" style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }} />
                        <input type="text" placeholder="Serial Number" style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }} />
                        <input type="text" placeholder="Description" style={{ padding: '0.5rem', borderRadius: '4px', border: '1px solid var(--border-color)', background: 'var(--bg-primary)', color: 'var(--text-primary)' }} />
                        <button className="btn-primary" style={{ justifySelf: 'start' }}>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' }}>Part Number</th>
                                <th style={{ padding: '1rem' }}>Serial Number</th>
                                <th style={{ padding: '1rem' }}>Description</th>
                                <th style={{ padding: '1rem' }}>Condition</th>
                                <th style={{ padding: '1rem' }}>Location</th>
                                <th style={{ padding: '1rem' }}>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr style={{ borderBottom: '1px solid var(--border-color)' }}>
                                <td style={{ padding: '1rem' }}>PT6C-67C</td>
                                <td style={{ padding: '1rem' }}>E-12345</td>
                                <td style={{ padding: '1rem' }}>Turboshaft Engine</td>
                                <td style={{ padding: '1rem' }}><span style={{ padding: '0.25rem 0.5rem', borderRadius: '4px', background: 'rgba(46, 204, 113, 0.2)', color: '#2ecc71' }}>Serviceable</span></td>
                                <td style={{ padding: '1rem' }}>9M-WSA</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' }}>BLADE-39</td>
                                <td style={{ padding: '1rem' }}>MR-9988</td>
                                <td style={{ padding: '1rem' }}>Main Rotor Blade</td>
                                <td style={{ padding: '1rem' }}><span style={{ padding: '0.25rem 0.5rem', borderRadius: '4px', background: 'rgba(241, 196, 15, 0.2)', color: '#f1c40f' }}>Insp. Due</span></td>
                                <td style={{ padding: '1rem' }}>Warehouse A</td>
                                <td style={{ padding: '1rem' }}><button className="btn-sm">View</button></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    );
};

export default SearchEquipment;
